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
I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.Tool
GitVersion version
6.1.0
Operating system
N/A, Windows
What are you seeing?
The feature to increment the version when merging into a branch by using the increment of the source branch is currently supported only in the TrunkBased workflow. It would be good to have the same behavior in the GitFlow and GitHubFlow workflows as well.
Hint: Needs to be implemented probably in MergeMessageVersionStrategy. We should create a separate version strategy class to be able to enable or disable the behavior via the configuration (strategies property).
What is expected?
Scenario 1:
When merging a hotfix branch with increment patch to a main branch with increment minor, I would expect the increment to be patch and not minor in a GitFlow workflow.
Scenario 2:
When merging a feature branch with increment minor to a main branch with increment patch, I would expect the increment to be minor and not patch in a GitFlow workflow.
Steps to Reproduce
Scenario 1:
*54 minutes ago (HEAD -> main)|\
|A56minutes ago (hotfix/foo)|/*58 minutes ago (tag:1.0.0)
Scenario 2:
*54 minutes ago (HEAD -> main)|\
|A56minutes ago (feature/foo)|/*58 minutes ago (tag:1.0.0)
See RepostioryFixture Test section below for more information.
RepositoryFixture Test
[Test]publicvoidGiven_main_with_increment_minor_and_hotfix_with_increment_patch_When_hotfix_merged_into_main_Then_increment_should_be_patch(){usingvarfixture=newEmptyRepositoryFixture("main");varconfigurationBuilder=TrunkBasedConfigurationBuilder.New.WithBranch("main", builder =>builder.WithIncrement(IncrementStrategy.Minor).WithDeploymentMode(DeploymentMode.ContinuousDelivery).WithPreventIncrementOfMergedBranch(true)).WithBranch("hotfix", builder =>builder.WithIncrement(IncrementStrategy.Patch));fixture.MakeATaggedCommit("1.0.0");fixture.BranchTo("hotfix/foo");fixture.MakeACommit();fixture.MergeTo("main");// ✅ succeeds as expectedfixture.AssertFullSemver("1.0.1-2",configurationBuilder.Build());}
It would be good to have the same behavior in the GitFlow and GitHubFlow workflows:
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.1.0
Operating system
N/A, Windows
What are you seeing?
The feature to increment the version when merging into a branch by using the increment of the source branch is currently supported only in the TrunkBased workflow. It would be good to have the same behavior in the
GitFlow
andGitHubFlow
workflows as well.Hint:
Needs to be implemented probably in MergeMessageVersionStrategy.We should create a separate version strategy class to be able to enable or disable the behavior via the configuration (strategies
property).What is expected?
Scenario 1:
When merging a hotfix branch with increment patch to a main branch with increment minor, I would expect the increment to be patch and not minor in a
GitFlow
workflow.Scenario 2:
When merging a feature branch with increment minor to a main branch with increment patch, I would expect the increment to be minor and not patch in a
GitFlow
workflow.Steps to Reproduce
Scenario 1:
Scenario 2:
See
RepostioryFixture Test
section below for more information.RepositoryFixture Test
It would be good to have the same behavior in the
GitFlow
andGitHubFlow
workflows:Additional acceptance criteria:
Output log or link to your CI build (if appropriate).
The text was updated successfully, but these errors were encountered: