GitVersion
GitVersion copied to clipboard
increment: inherit from incoming branch
Detailed Description
Increment
setting to "inherit" from incoming branch.
I would like my main
branch version increased, based on the settings of the branch being merged into it.
Context
I would like to rely on manual version bumping with +semver: minor
as little as possible.
If I have feature
branch with configuration increment: Minor
it would be nice that when I merge this branch into main
it would inherit the Minor
increment setting.
It's actually not clear for me what you trying to achieve with the feature. Could you please write an integration test and describe in it what you are expecting from this feature?
[Test]
public void __Just_A_Test__()
{
string yaml = @"...";
var configuration = ConfigSerializer.Read(new StringReader(yaml));
using var fixture = new EmptyRepositoryFixture();
fixture.MakeATaggedCommit("2.0.0");
// ✅ succeeds as expected
fixture.AssertFullSemver("2.0.0", configuration);
// ❌ expected: ...
fixture.AssertFullSemver("...", configuration);
}
This what you want is already possible in GitVersion with the usage of mainline mode:
This feature was introduced with issue https://github.com/GitTools/GitVersion/issues/1221. This might be also interesting https://github.com/GitTools/GitVersion/issues/2955