GitVersion does not handle repos without branches named develop or main/master #3669
-
As stated in another discussion we've decided on an unusual branching strategy where neither main/master nor develop is present. We've coined it multiple-trunk-based development. During testing of this setup I've discovered that branching from release/v1 branch (that is set as Am I right about this assumption? Is there any way to get around this to support our strategy? NB: For now we continue with the old strategy using develop and main (V1 is still in alpha so there's obviously no V2 yet) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there. If you take the following integration test then you see it is working out of the box: [Test]
public void TestForDiscussion3669()
{
var configuration = GitFlowConfigurationBuilder.New
.WithBranch("release", _ => _
.WithIncrement(IncrementStrategy.Minor)
.WithIsMainline(true)
.WithIsReleaseBranch(true)
.WithVersioningMode(VersioningMode.ContinuousDelivery)
).Build();
using var fixture = new EmptyRepositoryFixture("release/v1");
fixture.MakeATaggedCommit("1.0.0");
fixture.BranchTo("feature/just-a-feature");
fixture.MakeACommit();
// ✅ succeeds as expected
fixture.AssertFullSemver("1.1.0-just-a-feature.1+1", configuration);
} The is-mainline branch property is only used to detect commit tags on branches which are not present in the current commit line. |
Beta Was this translation helpful? Give feedback.
Hi there.
If you take the following integration test then you see it is working out of the box: