Skip to content
This repository was archived by the owner on Aug 5, 2019. It is now read-only.
Olivier Spinelli edited this page Dec 4, 2015 · 15 revisions

Why does CSemVer define ZeroBased for CI-Builds and SimpleGitVersion uses ZeroTimed term?

Good catch! The ZeroBased simply specifies that the 0.0.0 version must be used (with the prerelease --ci-[CIBuildName]-XXX) but does not state what the XXX is.

For its semantic version (NuGet V3), SimpleGitVersion uses the commit's time down to the hundredth of a second:

0.0.0--ci-develop.2015-03-14T19-06-24-42+v4.3.0-beta

As you can see the base tag is added as the version build metadata.

To support NuGet V2, things get a little bit more complicated because of the 20 characters limit. SimpleGitVersion uses the number of seconds between the commit's time and the 1st of january 2015, and this number of seconds is expressed in base 62 padded on 7 chars: 1000 years fit into 7 chars (the code is here).

The --ci trick is not possible with NuGet V2. We use an uppercase 'C' character ('C' < 'a' when compared lexically in ASCII sort order) and the base version is not appended as build metadata.

0.0.0-Cdevelop-00yI6aT

Clone this wiki locally