GitVersion not incrementing as expected on mainline mode
See original GitHub issueDescribe the bug We are not getting build versions as desired when using mainline mode.
Our GitVersion.yml is simply
mode: Mainline
Expected Behavior
Some background: We have a master branch and a preview branch to represent release rings. We do features and fixes in features/* and fix/* branches and then merge to preview…and then finally to master.
We have CI that builds and publishes a nuget package and we use the syntax *-preview*
to lock in consumers to our preview ring.
Example:
master
is currently at0.1.2
preview
(currently identical tomaster
) is at0.1.2-preview0088
- We create a new feature off of
preview
in a branchfeature/something
and it gets the version0.1.3-feature-something0001
- We merge
feature/something
intopreview
andpreview
gets the version0.1.3-preview0001
- We merge
preview
intomaster
andmaster
gets the version0.1.3
- Repeat the process
Actual Behavior
This seems to work sometimes, but not others, and when it doesn’t work, it is very difficult to get things re-aligned.
preview
(currently identical tomaster
) is at0.1.2-preview0088
- We create a new feature off of
preview
in a branchfeature/somethingnew
and it gets the version0.1.2-feature-somethingnew0001
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
GitVersion configuration is not incrementing
I included it just to make sure I'm using GitVersion and GitFlow in the intended way. require "git" def new_feature_branch i g =...
Read more >Version Incrementing
If you are using GitFlow then builds off the develop branch will actually increment on every commit. This is known in GitVersion as...
Read more >Configuration
Used to tell GitVersion not to increment when in Mainline development mode. Default \+semver:\s?(none|skip) , which will match occurrences of +semver: none ...
Read more >How to use GitVersion to get sensible versioning
Just like we saw on the develop branch, a part of the version increments with each commit on that branch. But since adding...
Read more >Mainline Development
If you do not want GitVersion to treat a commit or a pull request as a release and increment the version you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can read about the different modes in the documentation.
Please tak a look to the following integration test which I have been executed on current main branch: