-
Notifications
You must be signed in to change notification settings - Fork 654
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
Why do version numbers in branch names change the calculated version? #1536
Comments
You can use |
A tool that makes this problem escalate fairly quickly is Dependabot. Its branch names for package upgrade pull requests contains both "from" and "to" version numbers of the package being requested for upgrade, which causes GitVersion to generate quite crazy version numbers from a source that shouldn't be used at all. And as per dependabot/dependabot-core#396, there's little chance this will be fixed on Dependabot's side. We need to fix our version sourcing. 😃 |
Thanks for the hint to I'm working on a PR. The current solution uses a global configuration flag to indicate that branches must match the But maybe I should skip the configuration flag (or inverse it) and make this the default behavior? Another way might be to configure per branch if it is to be considered as a version source. What do you think? |
By the way excellent job on those tests! They made it super easy to get started. |
Thinking about it again, it's probably smarter to evaluate |
I created a pull request to fix the behavior by configuration. |
Problem
Since GitVersion 4 we noticed a suddend jump in the version generated by GitVersion. Looking at the diagnostic output it seems to respect a version number in the name of a merged branch. That is not intended though, because the version number in the branch name is purely coincidental:
bugfix/COCO-1266-ng-bootstrap-ng-bootstrap-2.2.0
.The
2.2.0
in the branch name seems to cause a bump to2.3.0
ondevelop
:The previous version of GitVersion correctly calculated
1.8.0
.Question
I'm wondering whether this behavior can be configured? Maybe there is a regex somewhere that we need to adjust?
Additional Info
I figured we could set
next-version
or use a git tag as a workaround.We are currently using an "unconfigured" (no
GitVersion.yml
) installation of GitVersion 4.0.0:Here's the diagnostic output:
The text was updated successfully, but these errors were encountered: