I am currently trying to implement GitFlow in a GitLab test project and then run the builds from TeamCity.
I have configured my GitVersion.yml file so that when I create a release branch (e.g. release/0.3.0) from develop versioned 0.3.0-alpha.3 for example and then commit to develop, the minor version on develop should increment (e.g. 0.4.0-alpha.1). But when I build develop on TeamCity it gets versioned 0.3.0-alpha.4 instead and I am required to build the release branch first and then rebuild develop to get the correct version 0.4.0-alpha.1.
Is there no way to get GitVersion to calculate the correct version of a develop branch build in TeamCity without having to first build the release branch? I would like to avoid the possibility of a developer building develop and a package with the wrong version gets pushed to the Octopus server.
Software versions:
- TeamCity: 2017.2.4 (build 51228) & 2018.1 (build 58245)
- GitVersion: v4.0.0-beta0012