Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increment: inherit from incoming branch #3114

Closed
AurimasNav opened this issue May 9, 2022 · 2 comments
Closed

increment: inherit from incoming branch #3114

AurimasNav opened this issue May 9, 2022 · 2 comments
Labels

Comments

@AurimasNav
Copy link

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.

@AurimasNav AurimasNav changed the title [Feature] Increment: inherit from incoming branch May 9, 2022
@AurimasNav AurimasNav changed the title Increment: inherit from incoming branch increment: inherit from incoming branch May 9, 2022
@HHobeck
Copy link
Contributor

HHobeck commented Sep 21, 2022

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);
}

@HHobeck
Copy link
Contributor

HHobeck commented Mar 5, 2023

This what you want is already possible in GitVersion with the usage of mainline mode:

image

This feature was introduced with issue #1221. This might be also interesting #2955

@HHobeck HHobeck closed this as completed Mar 5, 2023
@GitTools GitTools deleted a comment from phitattoo Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants