GitVersion does not calculate the next version correctly #4243
-
Prerequisites
GitVersion version What are you seeing? Hello Everybody! I am using GitVersion for the first time and I would like to increment the version of my main branch (named dev) with every merge commit from feature branches. Feature branches and the dev branch are the only branches I use and I only need to update the version in the dev (main) branch. GitVersion is used in an Azure Pipeline to calculate the new version and then the pipeline stores this generated version in a Directory.Build.props file, creates a new tag and pushes the change and the new tag to the repository on the dev branch. But currently always the Minor version gets incremented by 1 and I don't understand why. My current GitVersion.yaml looks like this ( I also attached an image because i was not able to format the file correctly with the Code tag):
And my commit history looks like this: What is expected? Thanks and Best Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Is there a specific reason why you're not using the latest version? |
Beta Was this translation helpful? Give feedback.
The reason was that I wasn't aware of version 6 of GitVersion. I upgraded it and the issue still remained. But I found a solution: the problem was that the built in configuration for "develop" was always applied because it is internally the first configuration that is processed and it matched the name of my "main" branch called dev. So I changed the GitVersion.yml like this and then it worked: