-
In this documentation page "Version Incrementing":
But it his other page "Configuration":
These indications are inconsistent. Can I use EDIT : I don't understand the notion of base version from the doc, but I assume a base version is the startup version that serve to begin the count. With the base version 5.3.4, the result is 5.3.4 or more (following the regular rule). It's convenient to integrate GitVersion in existing project. From my tests, it's the behavior of
Maybe I can just ignore this caution. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hmm what is the definition of base version? next-version works not with mainline mode and should be only used in non-trunk based workflows. I think the documentation needs to be changed. |
Beta Was this translation helpful? Give feedback.
-
If you take this scenario you see a very strange behavior: [Test]
public void _Just_A_Test__()
{
var configuration = GitHubFlowConfigurationBuilder.New.WithNextVersion("1.1.0")
.WithBranch("main", _ => _.WithVersioningMode(VersioningMode.Mainline))
.WithBranch("feature", _ => _.WithVersioningMode(VersioningMode.Mainline).WithIncrement(IncrementStrategy.Major))
.Build();
using var fixture = new EmptyRepositoryFixture("main");
fixture.MakeATaggedCommit("1.0.0");
fixture.BranchTo("feature/foo");
fixture.MakeACommit();
fixture.MakeACommit();
fixture.MakeACommit();
// ❌ expected: 2.0.0-foo.3
fixture.AssertFullSemver("1.0.0-foo.3", configuration);
fixture.Checkout("main");
fixture.MergeNoFF("feature/foo");
// ❌ expected: 2.0.0
fixture.AssertFullSemver("1.1.0", configuration);
} I'm not the author of
Happy branching! |
Beta Was this translation helpful? Give feedback.
-
It would be great if someone can explain this. Putting in next-version to some number like 6.0.0 or 6 for example will set semVersion to 6.0.0 and then you push again and you removed next-version, next version will be some 0.88.11 completely ignoring what you put in pervious time..... |
Beta Was this translation helpful? Give feedback.
If you take this scenario you see a very strange behavior: