Skip to content

Commit 522bf7c

Browse files
committed
fix!: no-bump-message now takes precedence over *-version-bump-message.
1 parent 9998780 commit 522bf7c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

BREAKING_CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Unreleased
2+
3+
* When using a commit message that matches **both** `*-version-bump-message` and `no-bump-message`, there is no increment for that commit. In other words, `no-bump-message` now takes precedence over `*-version-bump-message`.
4+
15
## v5.0.0
26

37
* Version numbers in branches other than `release` branches are no longer

src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ private ICommit[] GetHeadCommits(IGitRepository repo, ICommit? headCommit) =>
134134

135135
private static VersionField? GetIncrementFromMessage(string message, Regex majorRegex, Regex minorRegex, Regex patchRegex, Regex none)
136136
{
137+
if (none.IsMatch(message)) return VersionField.None;
137138
if (majorRegex.IsMatch(message)) return VersionField.Major;
138139
if (minorRegex.IsMatch(message)) return VersionField.Minor;
139140
if (patchRegex.IsMatch(message)) return VersionField.Patch;
140-
if (none.IsMatch(message)) return VersionField.None;
141141
return null;
142142
}
143143

0 commit comments

Comments
 (0)