GitVersion: Reverting tags to a lower version scheme does not seem to work

We’ve recently decided to change our internal version numbering for a large (50K commits) repo from a year-based number to a more traditional version number. As such, we’ve replaced all our existing tags numbered like 2015.x.y to 7.x.y. Unfortunately, GitVersion 3.6.1 still tries to extract information from the merge commits that happened somewhere in the history of the repo. For example, it decides the base-version to be 2015.5.1 using this commit message:

Base version used: Merge message 'Merge branch 'Development/2015.05.01' into 576446_Client_Reports': 2015.5.1 with commit count source 4ec2b7c3c6270b3ebd14e7ccf7dbfd84512bf945

We’ve tried to tweak the global commit-message-incrementing setting or the branch-specific prevent-increment-of-merged-branch-version and track-merge-target, but neither is doing the trick. Is this a bug or am I doing something wrong?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Good idea, lets do that for v4. Anyone want to put together an up for grabs issue.

Maybe something like

strategies:
  - merge-message: false

Other ideas?

Ah, that helps. I treated it as a top-level global setting.

@JakeGinnivan said… Basically, there is no way to turn off merge messages. It would be pretty easy to turn off by introducing a enable-version-from-merge-message or something, then just turn off https://github.com/GitTools/GitVersion/blob/master/src/GitVersionCore/VersionCalculation/BaseVersionCalculators/MergeMessageBaseVersionStrategy.cs

I think that would be very useful. I think we should be able to enable/disable all the strategy’s.