0
votes

According to the documentation of GitVersion for GitFlow, the minor version of the develop branch should be bumped when a release branch is created. As far as I understood it, this should happen automagically? (https://gitversion.readthedocs.io/en/latest/git-branching-strategies/gitflow-examples/) - See Minor/Major release branches

I'm currently using GitVersion 3.6.5 (as this is the version installed with the VSTS GitVersion task)

I created a small test repository as follows:

  • git init
  • [master] touch helloworld.txt
  • [master] git add --all
  • [master] git commit -m "Added file"
  • [master] git tag 0.1.0
  • [master] git checkout -b develop
  • [develop] touch helloworld.txt
  • [develop] git add --all
  • [develop] git commit -m "updated file"
  • [develop] gitversion --> Reports 0.2.0.unstable.# (OK)
  • [develop] git checkout -b release/0.2.0
  • [release/0.2.0] touch helloworld.txt
  • [release/0.2.0] git add --all
  • [release/0.2.0] git commit -m "Updated file"
  • [release/0.2.0] gitversion --> Reports 0.2.0.beta.# (OK)
  • [release/0.2.0] git checkout develop
  • [develop] touch helloworld.txt
  • [develop] git add --all
  • [develop] git commit -m "updated file again"
  • [develop] gitversion --> Reports 0.2.0.unstable.# (WRONG)

That last gitversion command, i expected it to report 0.3.0.unstable.#, because there exists a release branch for 0.2.0

Why isn't develop reporting an increase in minor version after I created the release branch and committed to it?!

1

1 Answers

0
votes

After testing the same flow with GitVersion 4.0.0-beta13, it correctly reports develop to be 0.3.0 instead of 0.2.0

Now i just need to figure out a way to incorporate 4.0.0 into our vsts build process

Edit:

Workaround for VSTS / TFS icm with GitVersion task: https://github.com/GitTools/GitVersion/issues/1160#issuecomment-381517122