Sample strategies that infer the normal component of a version.
Type | Name and description |
---|---|
static PartialSemVerStrategy |
ENFORCE_BRANCH_MAJOR_MINOR_X Enforces that the normal version complies with the current branch's major version. |
static PartialSemVerStrategy |
ENFORCE_BRANCH_MAJOR_X Enforces that the normal version complies with the current branch's major version. |
static PartialSemVerStrategy |
ENFORCE_GITFLOW_BRANCH_MAJOR_MINOR_X Enforces that the normal version complies with the current branch's major version. |
static PartialSemVerStrategy |
ENFORCE_GITFLOW_BRANCH_MAJOR_X Enforces that the normal version complies with the current branch's major version. |
static PartialSemVerStrategy |
USE_NEAREST_ANY If the nearest any is different from the nearest normal, sets the normal component to the nearest any's normal component. |
static PartialSemVerStrategy |
USE_SCOPE_PROP Increments the nearest normal version using the scope specified in the SemVerStrategyState#scopeFromProp#scopeFromProp. |
Type | Name and description |
---|---|
static PartialSemVerStrategy |
fromBranchPattern(java.util.regex.Pattern pattern) Uses the specified pattern to enforce that versions inferred on this branch comply. |
static PartialSemVerStrategy |
useScope(ChangeScope scope) Always use the scope provided to increment the normal component. |
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() |
Enforces that the normal version complies with the current branch's major version.
If the branch is not in the format #.#.x
(e.g. 2.3.x
), this will do
nothing.
Enforces that the normal version complies with the current branch's major version.
If the branch is not in the format #.x
(e.g. 2.x
), this will do
nothing.
Enforces that the normal version complies with the current branch's major version.
If the branch is not in the format release/#.#.x
(e.g. release/2.3.x
) or
release-#.#.x
(e.g. release-3.11.x
, this will do nothing.
Enforces that the normal version complies with the current branch's major version.
If the branch is not in the format release/#.x
(e.g. release/2.x
) or
release-#.x
(e.g. release-3.x
, this will do nothing.
If the nearest any is different from the nearest normal, sets the normal component to the nearest any's normal component. Otherwise do nothing.
For example, if the nearest any is 1.2.3-alpha.1
and the
nearest normal is 1.2.2
, this will infer the normal
component as 1.2.3
.
Increments the nearest normal version using the scope specified in the SemVerStrategyState#scopeFromProp#scopeFromProp.
Uses the specified pattern to enforce that versions inferred on this branch comply. Patterns should have 1 or 2 capturing groups representing the major and, optionally, the minor component of the version.
Always use the scope provided to increment the normal component.