GitVersion: Hotfix branch is not increasing Patch
Hello,
I am using version 5.5. I want to implement semantic versioning to my GitFlow. I got quite a lot of errors but have managed to work it out - the documentation is really poor.
Still I can’t manage to achieve one thing. On bugfixing situation, when I am creating new branch from master, it should have increased patch number - i.e. master
is 1.0.0, so the hotfix/test
should be 1.0.1 but it is 1.0.0.
I can achieve above when I am adding comment ‘+semver: patch’. Then, when I want to create 2nd patch, the version is not increasing at all (even with the comment). How it should work in this scenario? Here is mine GitVersion file.
next-version: 2.0.0
branches:
master:
regex: master
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
hotfix:
tag: beta
mode: ContinuousDelivery
regex: ^hotfix(es)?[/-]
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
tracks-release-branches: false
ignore:
sha: []
merge-message-formats: {}
Thanks, Rafal
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- add unit test for issues with hotfix branches details can be found in in #2454 — committed to senritsu/GitVersion by senritsu 3 years ago
- Added failing tests for #1255, #1844, #2034, #2454, #2693, #2821, #2786 — committed to GitTools/GitVersion by arturcic a year ago
- Added failing tests for #1255, #1844, #2034, #2454, #2693, #2821, #2786 — committed to GitTools/GitVersion by arturcic a year ago
- Added failing tests for #1255, #1844, #2034, #2454, #2693, #2821, #2786 — committed to GitTools/GitVersion by arturcic a year ago
- Added failing tests for #1255, #1844, #2034, #2454, #2693, #2821, #2786 — committed to GitTools/GitVersion by arturcic a year ago
- Added failing tests for #1255, #1844, #2034, #2454, #2693, #2821, #2786 — committed to GitTools/GitVersion by arturcic a year ago
@asbjornu So did a bit more fiddling. It seems that the version calculated in the hotfix branch only increments the patch value is there is a commit in the hotfix branch.
So, it my test I did.
git flow hotfix start 2022.05.01
In the hotfix branch gitversion calculated 2022.5.0.
I added a file, and committed… and then after that it calculated 2022.5.1. So, while not expected, it seems to be working. I just have to remember this for the next time we do a hotfix. 😃