You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -70,6 +71,11 @@ value of the `AssemblyInformationalVersion` attribute. Default set to
70
71
Sets the `mode` of how GitVersion should create a new version. Read more at
71
72
[versioning mode](/reference/versioning-mode.md).
72
73
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
+
73
79
### continuous-delivery-fallback-tag
74
80
When using `mode: ContinuousDeployment`, the value specified in
75
81
`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}`.
246
252
**Note:** To clear a default use an empty string: `tag: ''`
247
253
248
254
### 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).
251
256
252
257
### prevent-increment-of-merged-branch-version
253
258
When `release-2.0.0` is merged into master, we want master to build `2.0.0`. If
Copy file name to clipboardExpand all lines: docs/more-info/version-sources.md
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# 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.
3
3
4
4
The logic of GitVersion is something like this:
5
5
@@ -8,26 +8,38 @@ The logic of GitVersion is something like this:
8
8
- No: continue
9
9
- Calculate the base version (highest version from all the sources)
10
10
- 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
12
12
13
13
## 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.
16
16
17
17
Will increment: true
18
18
19
19
### 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.
21
21
22
22
Will increment: false
23
23
24
24
### 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.
26
26
27
-
Will increment: false
27
+
Will increment: depends on the value of `prevent-increment-of-merged-branch-version`
28
28
29
29
### 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
0 commit comments