This repository has been archived by the owner on Oct 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
SemVer Support
ajoberstar edited this page Sep 27, 2014
·
11 revisions
When strategies are being selected:
- Return false, if the project's
release.stage
property isn't set to one listed in the strategy'sstages
property. - Return false, if the repo has uncommitted changes and the strategy has
allowDirtyRepo
to be set tofalse
. - Return false, if the current branch is behind its tracked counterpart and the strategy has
allowBranchBehind
set tofalse
. - Return true.
When a version is inferred:
- Get the scope specified in the
release.scope
property of the project, if set. - Get the stage specified in the
release.stage
property of the project, if set. If it's not set, default to the first stage in the configuredSortedSet
. The first will be the one with the lowest precedence according to SemVer. - Determine the "nearest" version by looking at the commit logs of each tagged version to the current HEAD in the repository. The tag with the shortest commit log will be considered the nearest "any" version. The nearest "normal" is the tag corresponding to a "normal" version with the shortest commit log.
- Next the configured partial strategies will be applied in normal, pre-release, and build metadata order.
- If the strategy enforces version precedence the inferred version will be compared against the nearest "any" version. If the inferred version is less than the nearest any, an exception will be thrown.
- The inferred version will be returned.