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
Copy file name to clipboardExpand all lines: docs/reference/versioning-mode.md
+35-14Lines changed: 35 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -3,40 +3,61 @@ GitVersion has multiple modes to fit different different ways of working.
3
3
4
4
5
5
## Continuous Delivery
6
-
This is the default mode, GitVersion calculates the next version and will use that until that is released. For instance:
6
+
[Continuous Delivery](/reference/continuous-delivery) is the default mode. In
7
+
this mode, GitVersion calculates the next version and will use that until that
8
+
is released. For instance:
7
9
8
10
- 1.1.0+5
9
11
- 1.1.0+6
10
-
- 1.1.0+7 <-- This is the artifact we release, tag the commit which created this version
12
+
- 1.1.0+7 <-- This is the artifact we release, tag the commit which created
13
+
this version
11
14
- 1.1.1+0
12
15
13
-
Tags are required in this mode to communicate when the release is done as it's an external manual process.
16
+
Tags are required in this mode to communicate when the release is done as it's
17
+
an external manual process.
14
18
15
19
## Continuous deployment
16
-
Sometimes you just want the version to keep changing and continuously deploy. A good case for this is when using Octopus deploy, as you cannot publish the same version of a package into the same feed.
20
+
Sometimes you just want the version to keep changing and
21
+
[continuously deploy](/reference/continuous-deployment). A good case for this is
22
+
when using Octopus deploy, as you cannot publish the same version of a package
23
+
into the same feed.
17
24
18
-
For this mode we followed the logic in this blog post by Xavier Decoster on the issues of incrementing automatically - http://www.xavierdecoster.com/semantic-versioning-auto-incremented-nuget-package-versions
25
+
For this mode we followed the logic in [this blog post by Xavier Decoster][blog]
26
+
on the issues of incrementing automatically.
19
27
20
-
As such we force a pre-release tag on all branches, this is fine for applications but can cause problems for libraries. As such this mode may or may not work for you, which leads us into a new mode in v4. Mainline development.
28
+
As such we force a pre-release tag on all branches, this is fine for
29
+
applications but can cause problems for libraries. As such this mode may or may
30
+
not work for you, which leads us into a new mode in v4. Mainline development.
21
31
22
32
## Mainline development
23
-
Mainline development works more like the Continuous Delivery mode, except that it tells GitVersion to *infer* releases from merges and commits to `master`.
33
+
[Mainline development](/reference/mainline-development) works more like the
34
+
[Continuous Delivery mode](/reference/continuous-delivery), except that
35
+
it tells GitVersion to *infer* releases from merges and commits to `master`.
24
36
25
-
This mode is great if you do not want to tag each release because you simply deploy every commit to master. The behaviour of this mode is as follows:
37
+
This mode is great if you do not want to tag each release because you simply
38
+
deploy every commit to master. The behaviour of this mode is as follows:
26
39
27
40
1. Calclate a base version (likely a tag in this mode)
28
-
1. Walk all commits from the base version commit
29
-
1. When a merge commit is found:
41
+
2. Walk all commits from the base version commit
42
+
3. When a merge commit is found:
30
43
- Calculate increments for each direct commit on master
31
44
- Calculate the increment for the branch
32
-
1. Calculate increments for each remaining direct commit
33
-
1. For feature branches then calculate increment for the commits so far on your feature branch.
45
+
4. Calculate increments for each remaining direct commit
46
+
5. For feature branches then calculate increment for the commits so far on your
47
+
feature branch.
34
48
35
-
If you *do not want* GitVersion to treat a commit or a pull request as a release and increment the version you can use `+semver: none` or `+semver: skip` in a commit message to skip incrementing for that commit.
49
+
If you *do not want* GitVersion to treat a commit or a pull request as a release
50
+
and increment the version you can use `+semver: none` or `+semver: skip` in a
51
+
commit message to skip incrementing for that commit.
36
52
37
53
Here is an example of what mainline development looks like:
38
54
39
55

40
56
57
+
**WARNING:** This approach can slow down over time, we recommend to tag
58
+
intermitently (maybe for minor or major releases) because then GitVersion
59
+
will start the version calculation from that point. Much like a snapshot in an
60
+
event sourced system. We will probably add in warnings to tag when things are
61
+
slowing down.
41
62
42
-
**WARNING:** This approach can slow down over time, we recommend to tag intermitently (maybe for minor or major releases) because then GitVersion will start the version calculation from that point. Much like a snapshot in an event sourced system. We will probably add in warnings to tag when things are slowing down.
0 commit comments