Opinionated sample strategies. These can either be used as-is or as an example for others.
Modifiers | Name | Description |
---|---|---|
static class |
Strategies.BuildMetadata |
Sample strategies that infer the build metadata component of a version. |
static class |
Strategies.Normal |
Sample strategies that infer the normal component of a version. |
static class |
Strategies.PreRelease |
Sample strategies that infer the pre-release component of a version. |
Type | Name and description |
---|---|
static SemVerStrategy |
DEFAULT Provides opinionated defaults for a strategy. |
static SemVerStrategy |
DEVELOPMENT Provides a single "dev" stage that can be used in dirty repos but will enforce precedence. |
static SemVerStrategy |
FINAL Provides a single "final" stage that can only be used in clean repos and will enforce precedence. |
static SemVerStrategy |
PRE_RELEASE Provides "milestone" and "rc" stages that can only be used in clean repos and will enforce precedence. |
static SemVerStrategy |
PRE_RELEASE_ALPHA_BETA Provides "alpha", "beta" and "rc" stages that can only be used in clean repos and will enforce precedence. |
static SemVerStrategy |
SNAPSHOT Provides a single "SNAPSHOT" stage that can be used in dirty repos and will not enforce precedence. |
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() |
Provides opinionated defaults for a strategy. The primary behavior is for the normal component.
If the release.scope
property is set, use it. Or if the nearest any's normal component is different
than the nearest normal version, use it. Or, if nothing else, use PATCH scope.
Provides a single "dev" stage that can be used in dirty repos but will enforce precedence. If this strategy is used after a nearest any with a higher precedence pre-release component (e.g. "rc.1"), the dev component will be appended rather than replace. The commit count since the nearest any will be used to disambiguate versions and the pre-release component will note if the repository is dirty. The abbreviated ID of the HEAD will be used as build metadata.
Provides a single "final" stage that can only be used in clean repos and will enforce precedence. The pre-release and build metadata components will always be empty.
Provides "milestone" and "rc" stages that can only be used in clean repos
and will enforce precedence. The pre-release component will always be set
to the stage with an incremented count to disambiguate successive
releases of the same stage. No build metadata component will be added. Please
note that this strategy uses the same name as PRE_RELEASE_ALPHA_BETA
so it cannot be used at the same time.
Provides "alpha", "beta" and "rc" stages that can only be used in clean repos
and will enforce precedence. The pre-release-alpha-beta component will always be set
to the stage with an incremented count to disambiguate successive
releases of the same stage. No build metadata component will be added. Please note
that this strategy uses the same name as PRE_RELEASE
so it cannot be used
at the same time.
Provides a single "SNAPSHOT" stage that can be used in dirty repos and will not enforce precedence. The pre-release compoment will always be "SNAPSHOT" and no build metadata will be used. Tags will not be created for these versions.