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
Describe the bug
I have an issue where version is not incrementing correctly on every commit on release branch. The below method we are trying to implement:-
The master branch (v1.0.0) we create a new branch for the bug and it is merged back to master. Gitversion generate new version v.1.0.0-beta.1. Once we are ready to release i create a release branch (release/v1.0.0)
The build is triggered and with v1.0.0 for the release and if we are go around and fix any bugs on release branch we increment minor version and it only works fine for first commit i.e. pull request merge but later once it is stuck on the same version.
master -- v1.0.0
release/v1.0 -- v1.0.0 (Build is triggered and last commit is tagged to v1.0.0)
-- 1st PR Merged -- v1.0.1 (Build is triggered but not tagged)
-- 2nd PR Merged -- v1.0.1 ( Expected it to be v1.0.2)
Release branches are special since their version number is sourced from the branch name. You can see some of the logic involved in #1541. Please have a look through the existing tests and whether your use-case is covered or not. If it isn't and can be fixed without breaking existing tests, a PR is welcome.
It seems to me that this is not a bug report rather then a question. Please have a look to the following integration tests which has been executed succesfully on main:
[Test]publicvoidActualBehaviorFor2628(){varconfiguration=GitFlowConfigurationBuilder.New.WithBranch("main", _ =>_.WithVersioningMode(VersioningMode.Mainline).WithIncrement(IncrementStrategy.Minor)).WithBranch("release", _ =>_.WithVersioningMode(VersioningMode.Mainline).WithIncrement(IncrementStrategy.Patch).WithLabel("").WithIsMainline(true)).Build();usingvarfixture=newEmptyRepositoryFixture("main");fixture.MakeATaggedCommit("1.0.0");// ✅ succeeds as expectedfixture.AssertFullSemver("1.0.0",configuration);fixture.BranchTo("release/just-a-release");fixture.MakeACommit();// ✅ succeeds as expectedfixture.AssertFullSemver("1.0.1",configuration);fixture.MakeACommit();// ✅ succeeds as expectedfixture.AssertFullSemver("1.0.2",configuration);}
Describe the bug
I have an issue where version is not incrementing correctly on every commit on release branch. The below method we are trying to implement:-
The master branch (v1.0.0) we create a new branch for the bug and it is merged back to master. Gitversion generate new version v.1.0.0-beta.1. Once we are ready to release i create a release branch (release/v1.0.0)
The build is triggered and with v1.0.0 for the release and if we are go around and fix any bugs on release branch we increment minor version and it only works fine for first commit i.e. pull request merge but later once it is stuck on the same version.
Windows 10
dotnet-gitversion - v5.6.6
The text was updated successfully, but these errors were encountered: