-
Notifications
You must be signed in to change notification settings - Fork 654
[Feature] Prevent version increment of versions from tracked release branches #3352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
May I ask you what version your issue is related to? It seems to me that you have tested your scenario on the version 5.x which not reflecting the latest development initiatives. Better go with the main branch because we have done allot of work and changed the behavior e.g. how the branch configurations are determined. Anyway in my opinion this is already solved (please use for your test release/v4.0.0 for now because of a known issue #3341). Cheers. |
Yes, you are right. We are currently using |
Hmm I see... you need to ensure that on your release and fix branch the option tracks-release-branches is set to false. Try this configuration: mode: ContinuousDeployment
commit-message-incrementing: Disabled
branches:
main:
increment: Minor
label: 'beta'
tracks-release-branches: true
track-merge-target: true
prevent-increment-of-merged-branch-version: false
release:
increment: Patch
label: 'rc'
fix:
label: '{BranchName}'
increment: Inherit
regex: ^fix(es)?[/-]
source-branches:
- release
- fix BTW: You can also use the feature or hotfix branch instead of defining your own fix branch. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. |
I'm using a Release Flow branching strategy and I can almost configure GitVersion to do proper versioning for my scenario, except this one case:
release/v4.0
frommain
release/v4.0
(it getsSemVer
set to4.0.0-rc.1
-> nice!)fix/bug
fromrelease/v4.0
fix/bug
(it getsSemVer
set to4.0.1-bug.1
-> WRONG - should be4.0.0-bug.1
!)v4.0.0
on top commit of branchrelease/v4.0
(it getsSemVer
set to4.0.0
-> nice!)fix/bug
now getsSemVer
set to4.0.1-bug.1
-> nice!Here is my
GitVersion.yml
:Possible Implementation
It seems the
BaseVersions
resulting fromTrackReleaseBranchesVersionStrategy
always haveshouldIncrement
set totrue
. As there's already a configuration parameter calledprevent-increment-of-merged-branch-version
, is it possible to introduce a new parameter calledprevent-increment-of-tracked-release-version
which defaults tofalse
and I could set totrue
on my configuration for branch typefix
? I looked into the source code a bit and it seems, that this could be implemented relatively easy.The text was updated successfully, but these errors were encountered: