
Versioning
Git2SemVer generates versioning information and passes this to the optional C# script for modification before being passed back to the build.
Release versioning
Format:
<major>.<minor>.<patch>[+<build-id>.<branch>.<commit-sha>]
Where:
<build-id>
is the build ID or build number.<branch>
is the branch name.<commit-sha>
is the git commit SHA.
Examples:
Use | Schema |
---|---|
Build system | 1.2.3+<build-id> |
NuGet - filename | 1.2.3 |
Informational verion | 1.2.3+<build-id>.<branch>.<commit-sha> |
Important
All initial development versions (0.x.x) are pre-releases.
Pre-release versioning
Format:
<major>.<minor>.<patch>-<maturity-label>.<build-id>[+<branch>.<commit-sha>]
Where:
<maturity-label>
is the pre-release maturity label.<build-id>
is the build ID or build number.<branch>
is the branch name.<commit-sha>
is the git commit SHA.
Examples:
Use | Schema |
---|---|
Build system | 1.2.3-<label>.<build-id> |
NuGet - filename | 1.2.3-<label>.<build-id> |
Informational verion | 1.2.3-<label>.<build-id>+<branch>.<commit-sha> |
Initial development versioning (0.x.x)
All versions with a 0 major number (0.x.x) are initial development build versions (See Semmantic Versioning spec item 4). Git2SemVer makes all initial development builds pre-release build with "InidialDev" added to the maturity ID as shown in the table below.
Branch type | Maturity Label |
---|---|
Release | InitialDev |
RC | rc-InitialDev |
Feature | beta-InitialDev |
Development | alpha-InitialDev |
Note
Pre-release maturity labels are configurable by setting the MSBuild property Git2SemVer_BranchMaturityPattern. Values shown here are defaults.
Examples
See Versioning examples.