Skip to content

Commit 6170586

Browse files
DanielRoseJakeGinnivan
authored andcommitted
Update documentation.
1 parent 5a2fb17 commit 6170586

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

docs/configuration.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ next-version: 1.0
3232
assembly-versioning-scheme: MajorMinorPatch
3333
assembly-informational-format: '{InformationalVersion}'
3434
mode: ContinuousDelivery
35+
increment: Inherit
3536
continuous-delivery-fallback-tag: ci
3637
tag-prefix: '[vV]'
3738
major-version-bump-message: '\+semver:\s?(breaking|major)'
@@ -70,6 +71,11 @@ value of the `AssemblyInformationalVersion` attribute. Default set to
7071
Sets the `mode` of how GitVersion should create a new version. Read more at
7172
[versioning mode](/reference/versioning-mode.md).
7273

74+
### increment
75+
The part of the SemVer to increment when GitVersion detects it needs to be increased, such as for commits after a tag: `Major`, `Minor`, `Patch`, `None`.
76+
77+
The special value `Inherit` means that GitVersion should find the parent branch (i.e. the branch where the current branch was branched from), and use its values for [increment](#increment), [prevent-increment-of-merged-branch-version](#prevent-increment-of-merged-branch-version) and [is-develop](#is-develop).
78+
7379
### continuous-delivery-fallback-tag
7480
When using `mode: ContinuousDeployment`, the value specified in
7581
`continuous-delivery-fallback-tag` will be used as the pre-release tag for
@@ -246,8 +252,7 @@ of `alpha.foo` with the value of `alpha.{BranchName}`.
246252
**Note:** To clear a default use an empty string: `tag: ''`
247253

248254
### increment
249-
The part of the SemVer to increment when GitVersion detects it needs to be (i.e
250-
commit after a tag)
255+
Same as for the [global configuration, explained above](#increment).
251256

252257
### prevent-increment-of-merged-branch-version
253258
When `release-2.0.0` is merged into master, we want master to build `2.0.0`. If

docs/more-info/version-sources.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Version Sources
2-
GitVersion has a two step process for calculating the version number, the first is to calculate the base version which is used to then calculate what the next version should be.
2+
GitVersion has a two step process for calculating the version number. First it calculates the base version, which is then used to calculate what the next version should be.
33

44
The logic of GitVersion is something like this:
55

@@ -8,26 +8,38 @@ The logic of GitVersion is something like this:
88
- No: continue
99
- Calculate the base version (highest version from all the sources)
1010
- Increment version if needed based on branch config
11-
- Calculate the build metadata (everything after the +) and append to the calcuated version
11+
- Calculate the build metadata (everything after the +) and append to the calculated version
1212

1313
## Version Sources
14-
### Highest Accessible Tag
15-
GitVersion will find all tags on the current branch and return the highest one.
14+
### Tag name
15+
Returns the version numbers extracted from the current branch's tags.
1616

1717
Will increment: true
1818

1919
### Version in branch name
20-
If the branch has a version in it, then that version will be returned.
20+
Returns the version number from the branch's name.
2121

2222
Will increment: false
2323

2424
### Merge message
25-
If a branch with a version number in it is merged into the current branch, that version number will be used.
25+
Returns the version number of any branch (with a version number in its name) merged into the current branch.
2626

27-
Will increment: false
27+
Will increment: depends on the value of `prevent-increment-of-merged-branch-version`
2828

2929
### GitVersion.yml
30-
If the `next-version` property is specified in the config file, it will be used as a version source.
30+
Returns the value of the `next-version` property in the config file.
31+
32+
Will increment: false
33+
34+
### Develop branch
35+
For the develop branch, i.e. marked with `is-develop: true`
36+
- Returns the version number extracted from any child release-branches, i.e. those marked with `is-release-branch: true`
37+
- Returns the version number of any tags on the master branch
38+
39+
Will increment: true
40+
41+
### Fallback
42+
Returns the version number `0.1.0`.
3143

3244
Will increment: false
3345

0 commit comments

Comments
 (0)