-
Prerequisites
GitVersion packageGitVersion.Tool GitVersion version6.7.0 Operating systemWindows What are you seeing?It looks like VersionInBranchNameVersionStrategy is skipped (or not prioritized properly) when running in release or hotfix branches for me. What is expected?For example, if I'm in the branch Steps to ReproduceCreate a master branch, tag some commit with RepositoryFixture TestNo response Output log or link to your CI build (if appropriate).git-graph-hotfix.log INFO [26-04-02 14:23:00:62] Please run `git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=*` to see the git graph. This can help you troubleshoot any issues.
INFO [26-04-02 14:23:00:62] Working directory: d:\Documents\Projects\pp2
INFO [26-04-02 14:23:00:64] Project root is: d:\Documents\Projects\pp2\
INFO [26-04-02 14:23:00:64] DotGit directory is: d:\Documents\Projects\pp2\.git
INFO [26-04-02 14:23:00:64] Branch from build environment:
DEBUG [26-04-02 14:23:00:64] Trying to find configuration file GitVersion.yml at 'd:\Documents\Projects\pp2'
INFO [26-04-02 14:23:00:64] Found configuration file at 'd:\Documents\Projects\pp2\GitVersion.yml'
INFO [26-04-02 14:23:00:64] Using configuration file 'd:\Documents\Projects\pp2\GitVersion.yml'
INFO [26-04-02 14:23:00:75] Using latest commit on specified branch
INFO [26-04-02 14:23:01:18] Getting tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:59] Running against branch: hotfix/Hotfix-2026.04.01 ('f4b56e2' - Merge remote-tracking branch 'origin/master' into hotfix/Hotfix-2026.04.01)
INFO [26-04-02 14:23:01:60] -< Begin: Fetching the base versions for version calculation... >-
INFO [26-04-02 14:23:01:60] -< Begin: Calculating base versions for 'hotfix/Hotfix-2026.04.01' >-
INFO [26-04-02 14:23:01:60] -< Begin: [Using 'ConfiguredNextVersionVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:60] -< End: [Using 'ConfiguredNextVersionVersionStrategy' strategy] (Took: 0.69ms) >-
INFO [26-04-02 14:23:01:60] -< Begin: [Using 'MainlineVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:60] -< End: [Using 'MainlineVersionStrategy' strategy] (Took: 0.50ms) >-
INFO [26-04-02 14:23:01:60] -< Begin: [Using 'MergeMessageVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:64] -< End: [Using 'MergeMessageVersionStrategy' strategy] (Took: 40.46ms) >-
INFO [26-04-02 14:23:01:64] -< Begin: [Using 'TaggedCommitVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:65] -< Begin: Getting tagged semantic versions on branch 'refs/heads/hotfix/Hotfix-2026.04.01'. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose >-
DEBUG [26-04-02 14:23:01:65] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:66] -< End: Getting tagged semantic versions on branch 'refs/heads/hotfix/Hotfix-2026.04.01'. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose (Took: 9.09ms) >-
DEBUG [26-04-02 14:23:01:67] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:67] Git tag 'Hotfix-2026.03.30': Version increment '2026.3.30' +semver 'None' with label 'beta' based on commit '36dc033'.
DEBUG [26-04-02 14:23:01:68] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:68] Git tag 'Hotfix-2026.03.26': Version increment '2026.3.26' +semver 'None' with label 'beta' based on commit 'ed8ec44'.
DEBUG [26-04-02 14:23:01:68] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:68] Git tag 'Hotfix-2026.03.12': Version increment '2026.3.12' +semver 'None' with label 'beta' based on commit 'da7b2cf'.
DEBUG [26-04-02 14:23:01:68] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:68] Git tag 'Release-2026.03.05': Version increment '2026.3.5' +semver 'None' with label 'beta' based on commit 'c18f1be'.
DEBUG [26-04-02 14:23:01:69] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:69] Git tag 'Hotfix-2026.02.19': Version increment '2026.2.19' +semver 'None' with label 'beta' based on commit 'abb58d1'.
DEBUG [26-04-02 14:23:01:69] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:69] Git tag 'Hotfix-2026.02.12': Version increment '2026.2.12' +semver 'None' with label 'beta' based on commit '147a224'.
DEBUG [26-04-02 14:23:01:70] Returning cached tagged semantic versions. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
INFO [26-04-02 14:23:01:70] Git tag 'Release-2026.02.05': Version increment '2026.2.5' +semver 'None' with label 'beta' based on commit '34eab66'.
INFO [26-04-02 14:23:01:70] -< End: [Using 'TaggedCommitVersionStrategy' strategy] (Took: 56.35ms) >-
INFO [26-04-02 14:23:01:70] -< Begin: [Using 'TrackReleaseBranchesVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:70] -< End: [Using 'TrackReleaseBranchesVersionStrategy' strategy] (Took: 0.77ms) >-
INFO [26-04-02 14:23:01:70] -< Begin: [Using 'VersionInBranchNameVersionStrategy' strategy] >-
INFO [26-04-02 14:23:01:70] -< End: [Using 'VersionInBranchNameVersionStrategy' strategy] (Took: 0.63ms) >-
INFO [26-04-02 14:23:01:70] -< End: Calculating base versions for 'hotfix/Hotfix-2026.04.01' (Took: 100.44ms) >-
INFO [26-04-02 14:23:01:70] -< End: Fetching the base versions for version calculation... (Took: 102.84ms) >-
INFO [26-04-02 14:23:01:70] -------------------------------------------------------
INFO [26-04-02 14:23:01:70] Base version used: Git tag 'Hotfix-2026.03.30': Take '2026.3.30' based on commit '36dc033'.
INFO [26-04-02 14:23:01:70] -------------------------------------------------------
INFO [26-04-02 14:23:01:70] -< Begin: Using manual deployment workflow to calculate the incremented version. >-
INFO [26-04-02 14:23:01:70] 9 commits found between '36dc033' - Finish Hotfix-2026.03.30 and 'f4b56e2' - Merge remote-tracking branch 'origin/master' into hotfix/Hotfix-2026.04.01
INFO [26-04-02 14:23:01:71] -< End: Using manual deployment workflow to calculate the incremented version. (Took: 1.56ms) >-
DEBUG [26-04-02 14:23:01:71] Returning cached tagged semantic versions on branch 'refs/heads/hotfix/Hotfix-2026.04.01'. TagPrefix: ([Vv]|[Rr]elease-|[Hh]otfix-) and Format: Loose
DEBUG [26-04-02 14:23:01:71] Trying to find configuration file GitVersion.yml at 'd:\Documents\Projects\pp2'
INFO [26-04-02 14:23:01:71] Found configuration file at 'd:\Documents\Projects\pp2\GitVersion.yml'
INFO [26-04-02 14:23:01:71] Using configuration file 'd:\Documents\Projects\pp2\GitVersion.yml'
2026.3.30-beta.1+9 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Ok, I've managed to make it work: the So this is the fix: This looks completely odd to me since we already have the version pattern specifically for the branch name. |
Beta Was this translation helpful? Give feedback.
Ok, I've managed to make it work: the
tag-prefixMUST be added toversion-in-branch-patternsuddenly (and completely non-intuitively).So this is the fix:
This looks completely odd to me since we already have the version pattern specifically for the branch name.