3
votes

I found strange "issue", or rather behavior with GitVersion. Consider the following:

We work in dev branch, version is 0.1.0. I commit something to it with "+semver: minor" message. Nice, version is incremented, 0.2.0, we can go on, create a package, etc. We continue our work, I made new changes, committing with "+semver: minor" again. But version is still 0.2.0. What is the problem? I guess I don't understand how gitversion works or supposed to work.

Even if I try to create new branch from dev, then make bump commit in it, it still does not increment version again.

My goal is to have a simple workflow: Master branch for publishing new packages, we can branch from it, add some changes, bump version depending on type of task with commit message, then merge it back to master. Sounds simple, but it doesn't work as expected.

1

1 Answers

3
votes

I believe the issue here is that GitVersion will only apply the +semver: minor once between tags. For example, let's say you have tagged your repository at 0.1.0, then the following commit messages:

+semver: minor Fixing something
+semver: minor Fixing something else

Will only result in a single bumping of the minor version.

However, if you did something like:

+semver: minor Fixing something
tag the repository at 0.2.0
+semver: minor Fixing something else

Then you will get a bump to 0.3.0.