Skip to content

Commit f7b096f

Browse files
committed
Merge pull request #373 from JakeGinnivan/ReadmeUpdate
Added info on how we calculate version to readme
2 parents 33cd812 + bb3fde8 commit f7b096f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ This is just a small sample of the way GitVersion works. The idea is you just pl
4141

4242
If you have other branch types GitVersion is entirely configuration driven, so check out the [Configuration](#Configuration) section of the readme to understand how to make GitVersion work for you.
4343

44+
### The rules
45+
GitVersion has a few things which can impact the version, first we calculate the base version then we increment if needed and finally we calculate the build metadata (including commit count).
46+
The exception, if a commit is tagged we always use that version.
47+
48+
There are a few ways the base version is found, they are:
49+
50+
- Git tag (increments using default rules)
51+
- Version in branch name - for example `release-1.0.0` (does not get incremented)
52+
- Merge message - so when the versioned branch is merged the version is carried with it (does not get incremented)
53+
- GitVersion.yaml configuration file (`next-version` property) (does not get incremented)
54+
55+
The commit counting is done from where the base version originated from.
56+
4457
<a name='continuousdeployment' />
4558
## Octopus Deploy/CI Build NuGet Packages
4659
Those of you who have tried to do SemVer with Octopus Deploy or consume CI packages out of TeamCity would have hit

0 commit comments

Comments
 (0)