-
Notifications
You must be signed in to change notification settings - Fork 653
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] GitVersionTask: VersionSource is set to wrong tag #2394
Comments
Does the provided test fail? |
yes |
Sorry for taking so long and thank you so much for providing a failing test! I've now run the test and agree it seems weird that the version source is the first and not the last tag. This seems to be a duplicate of #1830, where it is correctly pointed out that the error comes from the following piece of code: GitVersion/src/GitVersion.Core/VersionCalculation/BaseVersionCalculator.cs Lines 56 to 73 in 34b21cb
If I swap the following comparison, the provided test turns green.
This swap also turns a lot of existing tests red, but only because the commit count is lowered due to a newer tag being taken as a version source. I need to dig a bit more into why the current logic is the way it is before we go ahead and change this, as it can be viewed as a breaking change. |
Okay, so the logic of I think this may be conflating two concepts into one, as the version source for the above test is the I'm not sure, but I do understand both the reasoning and why it's confusing that it is the way it is. Now, the question is: Why do you need |
I'm tracking this in #3041. |
Thank you very much providing the integration test because it gives me the possibility to dig into the issue very easily and I think I have found the problem. Actually we have the |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. |
🎉 This issue has been resolved in version 6.0.0-rc.1 🎉 Your GitReleaseManager bot 📦🚀 |
Describe the bug
Using the default configuration of GitVersionTask v5.3.7 the VersionSource ends up being not the latest tagged commit on master but rather the one before that.
Image of the test repository branch history: (blue: develop, red: master, green: release branches)
Output of
gitversion /diag
:Expected Behavior
I would expect the VersionSource to be the 0.4.0 tag
Actual Behavior
VersionSource is determined to be the 0.3.0 tag
I tried my hand on this fixture thing but i have no idea if i did it right:
The text was updated successfully, but these errors were encountered: