GitVersion
GitVersion copied to clipboard
[Bug] gitversion seems to pick the wrong base version, when using git flow while tagging on develop.
gitversion seems to pick the wrong base version, when using git flow while tagging on develop.
I created a demo project in the following manner: A master branch and a branched of develop branch I tagged the initial commit on master with v1.0.0 I made some changes, so that i got gitversion to calculate v1.1.0-alpha.2 on my develop branch. I (lightweight) tagged that commit with the tag name v1.1.0-alpha.2 on develop
Then i made a change again and committed it to develop.
The gitversion setup was standard git flow.
Expected Behavior
I was expecting that gitversion output is v1.1.0-alpha.3 because it should calculate the distance between the alpha tag on develop and my recent change.
Actual Behavior
gitversion outputs 1.1.0-alpha5 as the distance between the initial commit tagged 1.0.0 on master
I was also seeing that under some circumstances it behaved correctly (as described under exptected behaviour). I wasn't able to narrow that down but at some point I was also seeing that the usage of /diag outputs it the way I was expecting it. It wasn't possible for me to make it completly reproducable even after clean check outs and usage of /nocache.
Steps to Reproduce
7097 git init 7098 git add * 7099 git commit -a -m "initial commit" 7100 git checkout -b develop 7102 git checkout master 7103 git tag v1.0.0 7105 git checkout develop 7107 echo "change1" > testfile 7108 git commit -a -m "1 change" 7110 echo "change2" > testfile 7111 git commit -a -m "2 change" 7118 git tag v1.1.0-alpha.2 7124 echo "change4" > testfile 7125 git commit -a -m "4 change"
Your Environment
RHEL 7, Linux x64
- Version Used: gitversion 5.6.6
- Operating System and version (Windows 10, Ubuntu 18.04): RHEL 7
- Link to your project:
- Link to your CI build (if appropriate):
Are you able to reproduce this in a test and submit it as a pull request?
This issue has been fixed with https://github.com/GitTools/GitVersion/issues/3438
:tada: This issue has been resolved in version 6.0.0-beta.2 :tada: The release is available on:
Your GitReleaseManager bot :package::rocket: