Repository navigation
[Bug] SemVer of a feature branch started from a release branch gets decremented #3151
Description
Activity
- changed the title
[-][Bug][/-][+][Bug] SemVer of a feature branch started from a release branch gets decremented[/+]on Jul 12, 2022 feature/*branches should be created fromdevelop, not from arelease/*branch. If you change that, I think you'll get more of the inteded behaviour.So the idea is that stabilizing a
release/*branch should be done by direct pushes?Yes, or by merging more
feature/*branches intodevelopand then rebasing therelease/*branch ondevelopor mergingdevelopinto therelease/*branch.Could this be considered a future improvement? It is not explicitly stated how bugfixes should be done on
release/*branches in GitFlow, but having the ability to go through a PR with doing such a fix would be nice. Mergingdevelopintorelease/*is not always an option, as more development could have already happened there.It not rare to have rules on projects that only allow changes through pull requests. Especially on release branches as they tend to generate releasable artifacts.
Also, as @ni-jsuchocki said, if a team is big enough, it is also common to have new development on develop while stabilization work is happening on the release branch. So we might not want the new changes from develop while stabilizing the release branch.
Sure, I understand that. But I don't see a way to tell GitVersion to have
feature/*branches both trackdevelopandrelease/*branches simultaneously. At least not without a pull request that walks the commit tree until it finds arelease/*branch and then somehow decides that "yes, this is where I'm going to derive my version number from".An alternative would be to name the release-stabilizing branches differently from
feature/*and configure those to trackrelease/*somehow. I've never done that myself, so I'm not sure whether it's going to work, but it's worth trying.Please see the discussion in #3101.
Reacted by ni-fgenois- added a commit that references this issue
on Sep 16, 2022 Please take a look and tell me if you are agree with this test (see integration test here). Two commits have been pushed after you entered the beta phase that's why +2 IMO
Hi @HHobeck, sorry for not reaching out earlier but thanks a lot for the changes you've done here! I finally found some time to play around with the current state of the code and your changes seem to really improve on a couple of issues we were encountering earlier! Can't wait for the 6.0 release :)
🎉 This issue has been resolved in version 6.0.0 🎉
The release is available on:Your GitReleaseManager bot 📦🚀
Describe the bug
Hello! We are using GitVersion with the GitFlow branching scheme. I'd expect that the feature branch started from a release branch has the same SemVer as the parent release branch.
Expected Behavior
SemVer of a commit on a feature branch is the same as the SemVer of a parent release branch.
Actual Behavior
SemVer gets decremented to the previous release version.
Steps to Reproduce
Context
I know this can be fixed by setting
tracks-release-branches: truefor thereleasebranch type, but this has other consequences as well - for example if arelease/2.0.0branch is started in the same repo, the SemVer of a build from a feature branch will be2.0.0even if its parent branch isrelease/1.1.0.Also looking at the docs for
track-release-branches-Indicates this branch config represents develop in GitFlow.- I am wary to change it for release branches.It looks as it should be the default behaviour for me, but am I missing some other configuration options that would change this?
Your Environment
mainat5.10.4-beta.1+41.Branch.main.Sha.68604754376c7df1d7a378a3a29fb92d55dd3013, same behavior is observed in our CI where5.8.2is installed