I have configured my git repository in VSTS with the GitFlow repository.
I have a master branch with a dotnet core project, and a release branch called 'Release/1.0.0'. When I create a pull-request and merge the release/1.0.0 branch back to master, it does not increment it's version number to 1.0.0. Instead, it's increasing the version number from 0.1.0 (the base fallback) to 0.1.1.
Build log:
Calculating base versions
Fallback base version: 0.1.0 with commit count source xx
Git tag '0.1.0': 0.1.0 with commit count source xx
Base version used: Git tag '0.1.0': 0.1.0 with commit count source xx
However, the commit label is Merge branch Release/1.0.0 to master. And the branch being merged is tagged as 1.0.0.
I am using GitVersion default settings. I am using the GitVersion VSTS task.
This is the gitversion configuration:
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDelivery
branches: {}
ignore:
sha: []
What should i do to automatically set the version of the master branch to the versionnumber that is being merged?
Update: I found out what was going "wrong".
Releases were merged back as pull requests. This will set the commit message to Merge PR #### . However, the MergeMessageBaseVersionStrategy of gitversion can not handle this. If i merge the release back as a regular merge, the version number is increased.