-
Notifications
You must be signed in to change notification settings - Fork 653
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
Mainline: Increment non-master branches on same tagged commit? #1437
Comments
I'm encountering this problem as well. Super annoying. |
I'm still doing the "delete and reapply tag after" method, only I'm now adding prerelease tags too because it hard fails using mainline mode if there's a prerelease tag. 6 months without response... |
I ran into this today. I tagged master with version "1.2.0" then created a branch to work on a feature and the feature branch was being built as "1.2.0" Will this issue be resolved by the fix for issue #1536 ? |
This is a nagging issue for me as well. Even when building a commit tagged with a version, the version should be For example, assume master is built using "Release" configuration and creates tag "1.2.3". Assume the build environment is automatically setup to build "Debug" builds for all Recommended FixThere should be an option to force prerelease version tagging. If set globally, even when master is built, the version will be Suggested Name: prerelease-tag: It could be placed in the branch context, or placed at the top to increment regardless of tags. GitVersion.exe would have to be executed with an option to allow the release version to be generated. Leaving configuration set to false (default) would use current behavior. prerelease-tag: false (current behavior) prerelease-tag: true (new behavior) Thank you |
Is this fixed by #1540? |
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. Thank you for your contributions. |
I am running into this issue now as well. We open a release branch off of develop and would like that tagged as Sometimes release branches don't need any additional commits, but we require a merge to master to come from a release branch. |
@thetimbecker Did you find a work around for this? I would like to push the release branch that is cut off of the develop branch but does not have any additional commits. Creating a commit just to force this seems messy |
Sort of, our solution was to only tag commits to master. Then there aren't any tags on the commit so GitVersion uses the branch name to calculate version. For us, master is the only place tagging is necessary, so this works for us. But it'd be great to have the option to add tags on all branches. |
Only tagging on |
Yes, I am certain. It is really easy to reproduce too, if you want to check for yourself:
|
Using Gitversion 4.0.1-beta.1+2.Branch.master.Sha.0e77e2e16a136a1cd0f0474fe5710f617d508d81
Problem Description
Mainline works exactly as I'd expect except for when I tag a commit to a version.
For instance, I have master and develop. I make a commit to develop and merge it into master. Now both master and develop have the same HEAD at commit A.
If at this point I run gitversion on master, it'll say 0.1.1, and if I run it in develop, it'll say 0.2.0-alpha.0. This would be my expected behavior
If I tag master (Commit A) with v0.1.1 however, now if I run giversion on develop, it will now say 0.1.1 instead of 0.2.0-alpha.0. I suspect this is due to the versioning logic described of "if it sees a tag, stop processing" regardless of context.
The problem here is that if I do a pull request and merge develop, and Appveyor or someone tries to build "develop" natively, say for packaging and deployment, it will go out with the wrong version to that "prerelease" channel.
Recommended Fix
There should be an option in the .yaml file to flag non-master branches to say "if master has a tag, still process the mainline increment for gitversion based on this branch".
Suggested Name: increment-on-tag.
It could be placed in the branch context, or placed at the top to increment regardless of tags.
So if Commit A is tagged v0.1.1, and all branches have Commit A as their HEAD, I would expect to see in the gitversion output when switching to each branch:
Master: 0.1.1
Develop: 0.2.0-alpha.0 (because it defaults to Increment:Minor)
Hotfix: 0.1.2-hotfix.0 (because it defaults to Increment:Patch)
Known Workarounds
Thanks!
The text was updated successfully, but these errors were encountered: