-
Notifications
You must be signed in to change notification settings - Fork 652
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
CommitsSinceVersionSource goes down when deleting a release branch #1526
Comments
@arturcic @asbjornu @dazinator @gep13 @pascalberger any thoughts? |
Please see PR #1533 for the demonstration of this bug. |
After digging into the version calculation code a bit, I figured out that Since the commit count is return by |
Good question, @ruhullahshah. Do you have any suggestions? |
@asbjornu As of now no. I have never used |
Perhaps @ethomson, @bording or @nulltoken receives this and can provide some guidance? |
Upon further code exploration, I figured out that With the current version calculation strategies, I do not see as to how GitVersion could resolve this issue. To be a bit more comprehensive, consider the following GitVersion sequence diagram:
In the absence of the release branch, the Any suggestions to fix this? |
Good observation and forensics there, @ruhullahshah. Yep, it's obvious that
|
I discovered in the past that you can detect a release branch has been merged based on finding the standard merge commit message. However... I found that sometimes when merging release branches locally (I use git flow) - the merge is done as a fast forward.. which avoids any such merge commit and makes the release branch undetectable (as though it never existed). Therefore if you do rely on this strategy, you have to make it a policy when merging release branches to use the |
@asbjornu and @dazinator, Thanks for the feedback. I have created a fix for this issue in the referenced pull request. It would be nice to have your comments. |
@asbjornu just tried it now with the latest source code. It works. after deleting the branch, the release stays at 1.3.0-alpha.6 |
@DOMZE: Fantastic! Thanks to @ruhullahshah for fixing this long-standing issue! 🎉 |
Demonstration of bugs for issues GitToolsGH-1525 and GitToolsGH-1526.
Starting with a clean master branch with only a GitVersion.yml config file
Using the flow described in the following diagram:
When deleting the release branch after merging it back to develop causes the CommitsSinceVersionSource to go down from 0006 to 0005
Git commands to reproduce the behavior:
GitVersion.yml looks as follow:
Using GitVersion 4.0.0 and ContinuousDeployment in all branches
The text was updated successfully, but these errors were encountered: