@groovy.transform.Immutable(copyWith=true, knownImmutableClasses=[PartialSemVerStrategy]) final class SemVerStrategy
Strategy to infer versions that comply with Semantic Versioning.
Type | Name and description |
---|---|
static java.lang.String |
SCOPE_PROP |
static java.lang.String |
STAGE_PROP |
boolean |
allowDirtyRepo Whether or not this strategy can be used if the repo has uncommited changes. |
PartialSemVerStrategy |
buildMetadataStrategy The strategy used to infer the build metadata component of the version. |
boolean |
createTag Whether or not to create tags for versions inferred by this strategy. |
boolean |
enforcePrecedence Whether or not to enforce that versions inferred by this strategy are of higher precedence than the nearest any. |
java.lang.String |
name The name of the strategy. |
PartialSemVerStrategy |
normalStrategy The strategy used to infer the normal component of the version. |
PartialSemVerStrategy |
preReleaseStrategy The strategy used to infer the pre-release component of the version. |
java.util.SortedSet<java.lang.String> |
stages The stages supported by this strategy. |
Type | Name and description |
---|---|
boolean |
defaultSelector(Project project, Grgit grgit) Determines whether this strategy can be used to infer the version as a default. |
ReleaseVersion |
doInfer(Project project, Grgit grgit, NearestVersionLocator locator) |
ReleaseVersion |
infer(Project project, Grgit grgit) Infers the version to use for this build. |
boolean |
selector(Project project, Grgit grgit) Determines whether this strategy should be used to infer the version. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Whether or not this strategy can be used if the repo has uncommited changes.
The strategy used to infer the build metadata component of the version. There is no enforcement that this strategy only modify that part of the state.
Whether or not to create tags for versions inferred by this strategy.
Whether or not to enforce that versions inferred by this strategy are of higher precedence than the nearest any.
The name of the strategy.
The strategy used to infer the normal component of the version. There is no enforcement that this strategy only modify that part of the state.
The strategy used to infer the pre-release component of the version. There is no enforcement that this strategy only modify that part of the state.
The stages supported by this strategy.
Determines whether this strategy can be used to infer the version as a default.
false
, if the release.stage
is not one listed in the stages
property.false
, if the repository has uncommitted changes and allowDirtyRepo
is false
.true
, otherwise. Infers the version to use for this build. Uses the normal, pre-release, and build metadata
strategies in order to infer the version. If the release.stage
is not set, uses the
first value in the stages
set (i.e. the one with the lowest precedence). After inferring
the version precedence will be enforced, if required by this strategy.
Determines whether this strategy should be used to infer the version.
false
, if the release.stage
is not one listed in the stages
property.false
, if the repository has uncommitted changes and allowDirtyRepo
is false
.true
, otherwise.