Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] gitversion seems to pick the wrong base version, when using git flow while tagging on develop. #2597

Closed
cekay79 opened this issue Feb 15, 2021 · 3 comments
Labels
Milestone

Comments

@cekay79
Copy link

cekay79 commented Feb 15, 2021

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):
@cekay79 cekay79 added the bug label Feb 15, 2021
@asbjornu
Copy link
Member

asbjornu commented Mar 8, 2022

Are you able to reproduce this in a test and submit it as a pull request?

@HHobeck
Copy link
Contributor

HHobeck commented Mar 17, 2023

This issue has been fixed with #3438

@HHobeck HHobeck closed this as completed Mar 17, 2023
@HHobeck HHobeck added this to the 6.x milestone Mar 17, 2023
@arturcic arturcic modified the milestones: 6.x, 6.0.0-beta.2 Apr 6, 2023
@arturcic
Copy link
Member

arturcic commented Apr 6, 2023

🎉 This issue has been resolved in version 6.0.0-beta.2 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants