-
Notifications
You must be signed in to change notification settings - Fork 650
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
Allow assigning a version to the main branch / feature branches in a more easy way #3159
Comments
Can you please share your |
Hi asbjornu, this is my configuration:
|
Hi asbjornu, thank you for your first feedback to this topic. |
What happens if you set |
Hi asbornu, Thank you, that sounds reasonable! Just tried it out: The result is not what I wanted yet, because the tag "3.0-alpha" from the "main" branch is still taking precendence over the branch name "release/2.8". I expected that the tag from main would be ignored completely.
My new configuration is:
The new option is definitely an improvement because the Is there a way to achieve the behavior that I want, or would you suggest to use another approach? |
After some more tests, I found a promising approach: I realized that I want to have my "main" branch to act more like a "develop" branch. So I added this: And I removed the "3.0-alpha" tag from main (and all other old version tags because they dont belong there anyways). What do you think? |
Sounds good! |
Okay that means GitVersion has already all configuration option on board to fullfill your requirements right? I'm going to close this issue. Please give me a feedback if you are not agree. Please notice you can use the new workflow feature to write your custom workflow from scratch: #3305 Cheers. |
Improve version sources so that builds from the main branch can have a proper ALPHA-version without breaking release branches
I find it very difficult to assign a version to the main branch without affecting any release branches.
Often, the release branches are "inheriting" all version tags from the main branch and in the end the release gets a wrong version.
There should be a way to set a version source for only one branch and block any impact to other branches.
Detailed Description / Context
In git, all branches go eventually back to the same origin.
For release branches especially, I want to be able to create a new branch from main any time. So when I have a tag "3.0-alpha" in my main branch, all derived release branches will see this tag also.
But my release branch "release/2.2" should use yield a version "2.2-beta" based on the branch name.
The only way to achieve this now is to make sure that the "3.0-alpha" tag does not show up in the release branch's history. Otherwise it will take precendence.
I understand that the "next-version" configuration setting could help here. But unfortunately, the "next-version" seems to have precence over the branch name as a version source. So it does not seem to be a way.
Possible Implementation
On solution could be to let the "branch name" version source have precence over "next-version".
I guess this would be a breaking change so maybe activate this behavior with a new config option?
Another way would be to allow "next-version" to be branch-specific.
Or one could thing about making "tag-prefix" branch-specific, which would allow to restrict visiblity a special version tag only to main and feature-branches.
The text was updated successfully, but these errors were encountered: