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
It seems that a hotfix doesn't increment the patch number. I have created an example repository. When you checkout the master branch, then it should have version 0.1.1, but it gets 0.1.0 instead.
These are the actual commits (in the flow from the head to the base):
$ gitversion /output buildserver /nocache
INFO [09/16/21 17:42:54:87] Working directory: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue
INFO [09/16/21 17:42:54:89] Project root is: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue\
INFO [09/16/21 17:42:54:89] DotGit directory is: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue\.git
INFO [09/16/21 17:42:54:97] Using latest commit on specified branch
INFO [09/16/21 17:42:54:99] Running against branch: master (e362bb4 Merge branch 'hotfix/0.1.1')
INFO [09/16/21 17:42:54:99] Begin: Calculating base versions
INFO [09/16/21 17:42:55:00] Fallback base version: 0.1.0 with commit count source 8ac16e14fe116f94481be06b0ae1a7b4e8a279f9
INFO [09/16/21 17:42:55:01] Found commit [e362bb4 Merge branch 'hotfix/0.1.1'] matching merge message format: Default
INFO [09/16/21 17:42:55:01] Merge message 'Merge branch 'release/0.1'': 0.1.0 with commit count source cf06c1772568d7109a47b619874c7f94644e36e3
INFO [09/16/21 17:42:55:03] Found multiple base versions which will produce the same SemVer (0.1.0), taking oldest source for commit counting (Fallback base version)
INFO [09/16/21 17:42:55:03] Base version used: Fallback base version: 0.1.0 with commit count source 8ac16e14fe116f94481be06b0ae1a7b4e8a279f9
INFO [09/16/21 17:42:55:03] End: Calculating base versions (Took: 43.88ms)
INFO [09/16/21 17:42:55:04] 9 commits found between 8ac16e1 Initial commit and e362bb4 Merge branch 'hotfix/0.1.1'
INFO [09/16/21 17:42:55:04] Skipping version increment
INFO [09/16/21 17:42:55:04] 9 commits found between 8ac16e1 Initial commit and e362bb4 Merge branch 'hotfix/0.1.1'
INFO [09/16/21 17:42:55:05] Done writing
The merge message from the hotfix-branch isn't picked up by GitVersion. It does show the merge-message of the release branch, so I added the following GitVersion.yml file to test if that helps:
$ gitversion /output buildserver /nocache
INFO [09/16/21 17:45:50:31] Working directory: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue
INFO [09/16/21 17:45:50:33] Project root is: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue\
INFO [09/16/21 17:45:50:33] DotGit directory is: C:\Users\Ramon\Documents\OpenSource\GitVersion-issue\.git
INFO [09/16/21 17:45:50:40] Using latest commit on specified branch
INFO [09/16/21 17:45:50:42] Running against branch: master (e362bb4 Merge branch 'hotfix/0.1.1')
INFO [09/16/21 17:45:50:42] Begin: Calculating base versions
INFO [09/16/21 17:45:50:43] Fallback base version: 0.1.0 with commit count source 8ac16e14fe116f94481be06b0ae1a7b4e8a279f9
INFO [09/16/21 17:45:50:45] Found commit [e362bb4 Merge branch 'hotfix/0.1.1'] matching merge message format: Default
INFO [09/16/21 17:45:50:45] Found commit [e362bb4 Merge branch 'hotfix/0.1.1'] matching merge message format: Default
INFO [09/16/21 17:45:50:45] Merge message 'Merge branch 'hotfix/0.1.1'': 0.1.1 with commit count source e362bb4e1f9819aefb9e9a38f4e99f865e138a10
INFO [09/16/21 17:45:50:45] Merge message 'Merge branch 'release/0.1'': 0.1.0 with commit count source cf06c1772568d7109a47b619874c7f94644e36e3
INFO [09/16/21 17:45:50:47] Found multiple base versions which will produce the same SemVer (0.1.1), taking oldest source for commit counting (Merge message 'Merge branch 'hotfix/0.1.1'')
INFO [09/16/21 17:45:50:47] Base version used: Merge message 'Merge branch 'hotfix/0.1.1'': 0.1.1 with commit count source e362bb4e1f9819aefb9e9a38f4e99f865e138a10
INFO [09/16/21 17:45:50:47] End: Calculating base versions (Took: 44.61ms)
INFO [09/16/21 17:45:50:47] 0 commits found between e362bb4 Merge branch 'hotfix/0.1.1' and e362bb4 Merge branch 'hotfix/0.1.1'
INFO [09/16/21 17:45:50:47] Skipping version increment
INFO [09/16/21 17:45:50:47] 0 commits found between e362bb4 Merge branch 'hotfix/0.1.1' and e362bb4 Merge branch 'hotfix/0.1.1'
INFO [09/16/21 17:45:50:48] Done writing
Setting a hotfix to a release-branch seems completely wrong. What's going on here?
The text was updated successfully, but these errors were encountered:
It seems that a hotfix doesn't increment the patch number. I have created an example repository. When you checkout the
master
branch, then it should have version 0.1.1, but it gets 0.1.0 instead.These are the actual commits (in the flow from the head to the base):
When I run GitVersion, then I get the following output:
And the logging shows:
The merge message from the hotfix-branch isn't picked up by GitVersion. It does show the merge-message of the release branch, so I added the following
GitVersion.yml
file to test if that helps:Now, the correct version is generated:
And the logging shows:
Setting a hotfix to a release-branch seems completely wrong. What's going on here?
The text was updated successfully, but these errors were encountered: