You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like your help with a configuration that even though simple, I cannot get it to work.
I have attempted many many different variations and I cannot compose a GitVersion.yml that does the following:
Increment version with Patch when a commit is pushed on main
Increment version with Minor when a feature branch is merged on main
I removed any other configurations for hotfix and other non-default properties and regular expressions to keep it simple, but still the strategy followed is the increment value of the main branch which is "Patch" instead of the "Minor" which is of the merged branch
dotnet-gitversion with diagnostic output on the main branch after merging the test-branch
% dotnet-gitversion /diag
INFO [25-02-19 23:34:35:50] 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 [25-02-19 23:34:35:51] Working directory: /Users/vasilis.prantzos/Projects/review-api
INFO [25-02-19 23:34:35:52] Project root is: /Users/vasilis.prantzos/Projects/review-api/
INFO [25-02-19 23:34:35:52] DotGit directory is: /Users/vasilis.prantzos/Projects/review-api/.git
INFO [25-02-19 23:34:35:52] Branch from build environment:
INFO [25-02-19 23:34:35:52] Found configuration file at '/Users/vasilis.prantzos/Projects/review-api/GitVersion.yml'
INFO [25-02-19 23:34:35:58] Using latest commit on specified branch
INFO [25-02-19 23:34:35:63] Getting tagged semantic versions. TagPrefix: [vV]? and Format: Strict
INFO [25-02-19 23:34:35:67] Running against branch: main ('40bf003' - Merge branch 'test-branch')
INFO [25-02-19 23:34:35:67] -< Begin: Fetching the base versions for version calculation... >-
INFO [25-02-19 23:34:35:67] -< Begin: Calculating base versions for 'main' >-
INFO [25-02-19 23:34:35:67] -< Begin: [Using 'ConfiguredNextVersionVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:67] -< End: [Using 'ConfiguredNextVersionVersionStrategy' strategy] (Took: 0.32ms) >-
INFO [25-02-19 23:34:35:67] -< Begin: [Using 'MainlineVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:67] -< End: [Using 'MainlineVersionStrategy' strategy] (Took: 0.25ms) >-
INFO [25-02-19 23:34:35:67] -< Begin: [Using 'MergeMessageVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:70] -< End: [Using 'MergeMessageVersionStrategy' strategy] (Took: 27.45ms) >-
INFO [25-02-19 23:34:35:70] -< Begin: [Using 'TaggedCommitVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:70] -< Begin: Getting tagged semantic versions on branch 'refs/heads/main'. TagPrefix: [vV]? and Format: Strict >-
INFO [25-02-19 23:34:35:71] -< End: Getting tagged semantic versions on branch 'refs/heads/main'. TagPrefix: [vV]? and Format: Strict (Took: 0.95ms) >-
INFO [25-02-19 23:34:35:75] Git tag '4.1.8': Version increment '4.1.8' +semver 'Patch' with label '' based on commit '0383b76'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.7': Version increment '4.1.7' +semver 'Patch' with label '' based on commit '553c03f'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.6': Version increment '4.1.6' +semver 'Patch' with label '' based on commit '6fcaaac'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.5': Version increment '4.1.5' +semver 'Patch' with label '' based on commit 'ba99153'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.4': Version increment '4.1.4' +semver 'Patch' with label '' based on commit 'daaa3ad'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.3': Version increment '4.1.3' +semver 'Patch' with label '' based on commit '4954b87'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.2': Version increment '4.1.2' +semver 'Patch' with label '' based on commit 'a156711'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.1': Version increment '4.1.1' +semver 'Patch' with label '' based on commit '8add235'.
INFO [25-02-19 23:34:35:75] Git tag '4.1.0': Version increment '4.1.0' +semver 'Patch' with label '' based on commit 'de07a0c'.
INFO [25-02-19 23:34:35:75] Git tag '4.0.752': Version increment '4.0.752' +semver 'Patch' with label '' based on commit '0961991'.
INFO [25-02-19 23:34:35:75] -< End: [Using 'TaggedCommitVersionStrategy' strategy] (Took: 50.75ms) >-
INFO [25-02-19 23:34:35:75] -< Begin: [Using 'TrackReleaseBranchesVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:75] -< End: [Using 'TrackReleaseBranchesVersionStrategy' strategy] (Took: 0.24ms) >-
INFO [25-02-19 23:34:35:75] -< Begin: [Using 'VersionInBranchNameVersionStrategy' strategy] >-
INFO [25-02-19 23:34:35:75] -< End: [Using 'VersionInBranchNameVersionStrategy' strategy] (Took: 0.27ms) >-
INFO [25-02-19 23:34:35:75] -< End: Calculating base versions for 'main' (Took: 80.55ms) >-
INFO [25-02-19 23:34:35:75] -< End: Fetching the base versions for version calculation... (Took: 81.69ms) >-
INFO [25-02-19 23:34:35:75] -------------------------------------------------------
INFO [25-02-19 23:34:35:75] Base version used: Git tag '4.1.8': Take '4.1.8' based on commit '0383b76'.
INFO [25-02-19 23:34:35:75] -------------------------------------------------------
INFO [25-02-19 23:34:35:75] -< Begin: Using continuous deployment workflow to calculate the incremented version. >-
INFO [25-02-19 23:34:35:76] 4 commits found between '0383b76' - Merge branch 'WT-9010-review-moderation-notifications-with-token' into 'main' and '40bf003' - Merge branch 'test-branch'
INFO [25-02-19 23:34:35:76] -< End: Using continuous deployment workflow to calculate the incremented version. (Took: 1.55ms) >-
INFO [25-02-19 23:34:35:77] Found configuration file at '/Users/vasilis.prantzos/Projects/review-api/GitVersion.yml'
Executing GenerateSetVersionMessage for 'LocalBuild'.
Executing GenerateBuildLogOutput for 'LocalBuild'.
{
"AssemblySemFileVer": "4.1.9.0",
"AssemblySemVer": "4.1.9.40bf003--2025-02-19",
"BranchName": "main",
"BuildMetaData": null,
"CommitDate": "2025-02-19",
"CommitsSinceVersionSource": 4,
"EscapedBranchName": "main",
"FullBuildMetaData": "Branch.main.Sha.40bf003a7b0e378364a965881703375401ae59b8",
"FullSemVer": "4.1.9",
"InformationalVersion": "4.1.9.40bf003--2025-02-19",
"Major": 4,
"MajorMinorPatch": "4.1.9",
"Minor": 1,
"Patch": 9,
"PreReleaseLabel": "",
"PreReleaseLabelWithDash": "",
"PreReleaseNumber": null,
"PreReleaseTag": "",
"PreReleaseTagWithDash": "",
"SemVer": "4.1.9",
"Sha": "40bf003a7b0e378364a965881703375401ae59b8",
"ShortSha": "40bf003",
"UncommittedChanges": 0,
"VersionSourceSha": "0383b76abf3aef1c1d384db6627473b2493a5318",
"WeightedPreReleaseNumber": 60000
}
And the commits from the git log are the following:
Please help, I am desperate, I have spent hours and even spoken with LLMs to get a clue as to what might be the problem.
I even downgraded the dotnet-gitversion tool to 5.11 and used an old configuration from an older project, but for some reason on my local git it still did not work 🤷♂️
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I would like your help with a configuration that even though simple, I cannot get it to work.
I have attempted many many different variations and I cannot compose a GitVersion.yml that does the following:
I removed any other configurations for hotfix and other non-default properties and regular expressions to keep it simple, but still the strategy followed is the increment value of the main branch which is "Patch" instead of the "Minor" which is of the merged branch
This is my GitVersion.yml
dotnet-gitversion output on the main branch before merging the
test-branch
%dotnet-version
dotnet-gitversion of the feature branch
Merging a branch
% git merge test-branch
...
dotnet-gitversion with diagnostic output on the main branch after merging the
test-branch
And the commits from the git log are the following:
% git log --merges --oneline
Please help, I am desperate, I have spent hours and even spoken with LLMs to get a clue as to what might be the problem.
I even downgraded the dotnet-gitversion tool to 5.11 and used an old configuration from an older project, but for some reason on my local git it still did not work 🤷♂️
Beta Was this translation helpful? Give feedback.
All reactions