-
Notifications
You must be signed in to change notification settings - Fork 651
Incorrect increment when merging feature branch into master. #1689
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
Comments
Setting the increment for Master to "Inherit" makes it behave correctly in the above situation.
These branches both share the same base commit, but I don't see how or why that should cause this. Relevant segment of the log for reference:
|
I'd forgotten to post it here, but I have had some further issues with this configuration. I've tried trimming the set of source-branches to just 'master' on the other branches, so that it wouldn't try to use the wrong branch in the above scenario, however, it gets stuck in an infinite loop of trying to find the increment to inherit, failing to do so, defaulting to using master's increment, and needing to find the increment to inherit again. I have also tried using Mainline which from what I understand is supposed to be the way to achieve what I'm trying to do here, but I have so far not been able to get it to work correctly. Honestly, at this point I only really want to know how to configure GitVersion so that creating a feature / patch branch from master, and merging it back in will increment the appropriate version number for the branch. It really shouldn't be complicated to do, and yet nothing that I've tried has actually worked. |
Closing since the linked issue is bound to be more helpful / relevant. |
When merging a feature branch into Master, GitVersion is incrementing the patch number, rather than the minor version number. The minor version number is correctly incremented when evaluated in-branch, but when merged into Master, it only increments the patch version, as if it was just a commit to master, rather than a merge.
Customised GitVersion.yml for reference:
Other potentially relevant information:
Merge is via merging a pull-request on GitHub.
GitVersion is being used in AzurePipelines triggered on commits, using the GitVersion add-in for it.
Example git history graph for clarity:
Any suggestions for what I must be doing wrong here, and how I can make it behave the way I would like it to?
The text was updated successfully, but these errors were encountered: