-
Notifications
You must be signed in to change notification settings - Fork 657
Description
Describe the bug
Series of +semver:
commit messages bumps version up to next major, e.g. 2.0.0
.
Explicit tag says 1.1.0
.
Next commit still suggests 2.0.0
Expected Behavior
Explicit tag should take priority over the messages in commit history.
Tag should reset the calculation of the version from message history before the tag.
Latest tag should be considered new baseline, and only messages in commit history following the tag should be considered.
Actual Behavior
Tag is ignored completely, and +semver:
commit history wins.
Possible Fix
Ignore commit history before the tag.
Steps to Reproduce
$ git log --oneline
9514c9e (HEAD -> main) #(2.0.0+7)
d749b10 +semver: none #(2.0.0+6)
6d6eace (tag: 1.1.0) +semver: fix #(2.0.0+5)
a0b2e0e +semver: feature #(2.0.0+4)
77f5a4a +semver: major #(2.0.0+3)
842d1ce +semver: feature #(1.1.0+2)
8ca3e12 +semver: fix #(1.0.1+1)
9f90368 (tag: 1.0.0) initial
Context
Message in commit history suggested bumping the major version.
This is later considered as mistake.
History is written, and its rewrite is not possible.
Explicit tag is used to reset/baseline the automated version calculation.
Your Environment
Windows 10
GitVersion 5.9.0