Skip to content

Commit fe27454

Browse files
committed
Enable ignored unit tests
1 parent 61bcef9 commit fe27454

File tree

21 files changed

+426
-756
lines changed

21 files changed

+426
-756
lines changed

docs/input/docs/reference/configuration.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ branches:
370370
- main
371371
pre-release-weight: 30000
372372
pull-request:
373-
mode: ManualDeployment
373+
mode: ContinuousDelivery
374374
label: PullRequest
375375
increment: Inherit
376376
label-number-pattern: '[/-](?<number>\d+)'
@@ -379,17 +379,16 @@ branches:
379379
- main
380380
pre-release-weight: 30000
381381
unknown:
382-
mode: ManualDeployment
383-
increment: Inherit
382+
increment: Patch
384383
regex: (?<BranchName>.+)
384+
prevent-increment:
385+
when-current-commit-tagged: false
385386
source-branches:
386387
- main
387-
- feature
388-
- hotfix
389-
- pull-request
388+
pre-release-weight: 30000
390389
ignore:
391390
sha: []
392-
mode: ManualDeployment
391+
mode: ContinuousDelivery
393392
label: '{BranchName}'
394393
increment: Inherit
395394
prevent-increment:
@@ -403,6 +402,7 @@ regex: ''
403402
tracks-release-branches: false
404403
is-release-branch: false
405404
is-main-branch: false
405+
406406
```
407407

408408
The details of the available options are as follows:

src/GitVersion.Configuration/SupportedWorkflows/TrunkBased/v1.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ branches:
4545
- main
4646
pre-release-weight: 30000
4747
pull-request:
48-
mode: ManualDeployment
48+
mode: ContinuousDelivery
4949
label: PullRequest
5050
increment: Inherit
5151
label-number-pattern: '[/-](?<number>\d+)'
@@ -54,17 +54,16 @@ branches:
5454
- main
5555
pre-release-weight: 30000
5656
unknown:
57-
mode: ManualDeployment
58-
increment: Inherit
57+
increment: Patch
5958
regex: (?<BranchName>.+)
59+
prevent-increment:
60+
when-current-commit-tagged: false
6061
source-branches:
6162
- main
62-
- feature
63-
- hotfix
64-
- pull-request
63+
pre-release-weight: 30000
6564
ignore:
6665
sha: []
67-
mode: ManualDeployment
66+
mode: ContinuousDelivery
6867
label: '{BranchName}'
6968
increment: Inherit
7069
prevent-increment:

src/GitVersion.Configuration/TrunkBasedConfigurationBuilder.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private TrunkBasedConfigurationBuilder()
2626
VersionInBranchPattern = ConfigurationConstants.DefaultVersionInBranchPattern,
2727
TagPreReleaseWeight = ConfigurationConstants.DefaultTagPreReleaseWeight,
2828
UpdateBuildNumber = ConfigurationConstants.DefaultUpdateBuildNumber,
29-
DeploymentMode = DeploymentMode.ManualDeployment,
29+
DeploymentMode = DeploymentMode.ContinuousDelivery,
3030
RegularExpression = string.Empty,
3131
Label = ConfigurationConstants.BranchNamePlaceholder,
3232
Increment = IncrementStrategy.Inherit,
@@ -80,7 +80,7 @@ private TrunkBasedConfigurationBuilder()
8080
WithBranch(HotfixBranch.Name).WithConfiguration(new BranchConfiguration()
8181
{
8282
Increment = IncrementStrategy.Patch,
83-
RegularExpression = HotfixBranch.RegexPattern,
83+
RegularExpression = "^hotfix(es)?[/-](?<BranchName>.+)",
8484
SourceBranches =
8585
[
8686
this.MainBranch.Name
@@ -96,7 +96,7 @@ private TrunkBasedConfigurationBuilder()
9696
{
9797
Increment = IncrementStrategy.Inherit,
9898
RegularExpression = PullRequestBranch.RegexPattern,
99-
DeploymentMode = DeploymentMode.ManualDeployment,
99+
DeploymentMode = DeploymentMode.ContinuousDelivery,
100100
SourceBranches =
101101
[
102102
this.MainBranch.Name
@@ -108,15 +108,17 @@ private TrunkBasedConfigurationBuilder()
108108

109109
WithBranch(UnknownBranch.Name).WithConfiguration(new BranchConfiguration
110110
{
111+
Increment = IncrementStrategy.Patch,
111112
RegularExpression = UnknownBranch.RegexPattern,
112-
DeploymentMode = DeploymentMode.ManualDeployment,
113-
Increment = IncrementStrategy.Inherit,
114113
SourceBranches =
115114
[
116-
this.MainBranch.Name,
117-
this.FeatureBranch.Name,
118-
this.PullRequestBranch.Name
119-
]
115+
this.MainBranch.Name
116+
],
117+
PreventIncrement = new PreventIncrementConfiguration()
118+
{
119+
WhenCurrentCommitTagged = false
120+
},
121+
PreReleaseWeight = 30000
120122
});
121123
}
122124
}

src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public void GetBranchesContainingCommitThrowsDirectlyOnNullCommit()
213213
}
214214

215215
[Test]
216-
[Ignore("Needs more investigations.")]
217216
public void FindCommitBranchWasBranchedFromShouldReturnNullIfTheRemoteIsTheOnlySource()
218217
{
219218
using var fixture = new RemoteRepositoryFixture();

src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,17 +452,20 @@ public void CommitBeetweenMergeReleaseToDevelopShouldNotResetCount()
452452
}
453453

454454
[Test]
455-
[Ignore("Needs investigation")]
456455
public void ReleaseBranchShouldUseBranchNameVersionDespiteBumpInPreviousCommit()
457456
{
457+
var configuration = GitFlowConfigurationBuilder.New
458+
.WithSemanticVersionFormat(SemanticVersionFormat.Loose)
459+
.Build();
460+
458461
using var fixture = new EmptyRepositoryFixture();
459462
fixture.Repository.MakeATaggedCommit("1.0");
460463
fixture.Repository.MakeACommit("+semver:major");
461464
fixture.Repository.MakeACommit();
462465

463466
fixture.BranchTo("release/2.0");
464467

465-
fixture.AssertFullSemver("2.0.0-beta.1+2");
468+
fixture.AssertFullSemver("2.0.0-beta.1+2", configuration);
466469
}
467470

468471
[Test]

src/GitVersion.Core.Tests/TrunkBased/TrunkBasedScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ public string GetVersionWithNoLabelOnMain(
148148
return fixture!.GetVersion(trunkBased).FullSemVer;
149149
}
150150

151-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
152151
[TestCase(IncrementStrategy.None, IncrementStrategy.None, null, ExpectedResult = "0.0.0-1+0")]
153152
[TestCase(IncrementStrategy.None, IncrementStrategy.Patch, null, ExpectedResult = "0.0.1-1+0")]
154153
[TestCase(IncrementStrategy.None, IncrementStrategy.Minor, null, ExpectedResult = "0.1.0-1+0")]
@@ -232,11 +231,11 @@ public string GetVersionWithNoLabelOnMain(
232231
[TestCase(IncrementStrategy.Major, IncrementStrategy.Patch, "{BranchName}", ExpectedResult = "0.0.1-foo.1+0")]
233232
[TestCase(IncrementStrategy.Major, IncrementStrategy.Minor, "{BranchName}", ExpectedResult = "0.1.0-foo.1+0")]
234233
[TestCase(IncrementStrategy.Major, IncrementStrategy.Major, "{BranchName}", ExpectedResult = "1.0.0-foo.1+0")]
235-
public string GetVersionWithNoLabelOnMainAndTakeAlwaysIncrementedVersion(
234+
public string GetVersionWithNoLabelAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain(
236235
IncrementStrategy incrementOnMain, IncrementStrategy increment, string? label)
237236
{
238237
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
239-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
238+
.WithPreventIncrementWhenCurrentCommitTagged(false)
240239
.WithBranch("main", _ => _.WithIncrement(incrementOnMain).WithLabel(null))
241240
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
242241
.Build();
@@ -358,7 +357,6 @@ public string GetVersionWithEmptyLabelOnMain(
358357
return fixture!.GetVersion(trunkBased).FullSemVer;
359358
}
360359

361-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
362360
[TestCase(IncrementStrategy.None, IncrementStrategy.None, null, ExpectedResult = "0.0.0-1+0")]
363361
[TestCase(IncrementStrategy.None, IncrementStrategy.Patch, null, ExpectedResult = "0.0.1-1+0")]
364362
[TestCase(IncrementStrategy.None, IncrementStrategy.Minor, null, ExpectedResult = "0.1.0-1+0")]
@@ -442,11 +440,11 @@ public string GetVersionWithEmptyLabelOnMain(
442440
[TestCase(IncrementStrategy.Major, IncrementStrategy.Patch, "{BranchName}", ExpectedResult = "0.0.1-foo.1+0")]
443441
[TestCase(IncrementStrategy.Major, IncrementStrategy.Minor, "{BranchName}", ExpectedResult = "0.1.0-foo.1+0")]
444442
[TestCase(IncrementStrategy.Major, IncrementStrategy.Major, "{BranchName}", ExpectedResult = "1.0.0-foo.1+0")]
445-
public string GetVersionWithEmptyLabelOnMainAndTakeAlwaysIncrementedVersion(
443+
public string GetVersionWithEmptyLabelAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain(
446444
IncrementStrategy incrementOnMain, IncrementStrategy increment, string? label)
447445
{
448446
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
449-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
447+
.WithPreventIncrementWhenCurrentCommitTagged(false)
450448
.WithBranch("main", _ => _.WithIncrement(incrementOnMain).WithLabel(string.Empty))
451449
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
452450
.Build();
@@ -568,7 +566,6 @@ public string GetVersionWithLabelFooOnMain(
568566
return fixture!.GetVersion(trunkBased).FullSemVer;
569567
}
570568

571-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
572569
[TestCase(IncrementStrategy.None, IncrementStrategy.None, null, ExpectedResult = "0.0.0-1+0")]
573570
[TestCase(IncrementStrategy.None, IncrementStrategy.Patch, null, ExpectedResult = "0.0.1-1+0")]
574571
[TestCase(IncrementStrategy.None, IncrementStrategy.Minor, null, ExpectedResult = "0.1.0-1+0")]
@@ -652,11 +649,11 @@ public string GetVersionWithLabelFooOnMain(
652649
[TestCase(IncrementStrategy.Major, IncrementStrategy.Patch, "{BranchName}", ExpectedResult = "0.0.1-foo.1+0")]
653650
[TestCase(IncrementStrategy.Major, IncrementStrategy.Minor, "{BranchName}", ExpectedResult = "0.1.0-foo.1+0")]
654651
[TestCase(IncrementStrategy.Major, IncrementStrategy.Major, "{BranchName}", ExpectedResult = "1.0.0-foo.1+0")]
655-
public string GetVersionWithLabelFooOnMainAndTakeAlwaysIncrementedVersion(
652+
public string GetVersionWithLabelFooAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain(
656653
IncrementStrategy incrementOnMain, IncrementStrategy increment, string? label)
657654
{
658655
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
659-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
656+
.WithPreventIncrementWhenCurrentCommitTagged(false)
660657
.WithBranch("main", _ => _.WithIncrement(incrementOnMain).WithLabel("foo"))
661658
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
662659
.Build();
@@ -778,7 +775,6 @@ public string GetVersionWithLabelBarOnMain(
778775
return fixture!.GetVersion(trunkBased).FullSemVer;
779776
}
780777

781-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
782778
[TestCase(IncrementStrategy.None, IncrementStrategy.None, null, ExpectedResult = "0.0.0-1+0")]
783779
[TestCase(IncrementStrategy.None, IncrementStrategy.Patch, null, ExpectedResult = "0.0.1-1+0")]
784780
[TestCase(IncrementStrategy.None, IncrementStrategy.Minor, null, ExpectedResult = "0.1.0-1+0")]
@@ -862,11 +858,11 @@ public string GetVersionWithLabelBarOnMain(
862858
[TestCase(IncrementStrategy.Major, IncrementStrategy.Patch, "{BranchName}", ExpectedResult = "0.0.1-foo.1+0")]
863859
[TestCase(IncrementStrategy.Major, IncrementStrategy.Minor, "{BranchName}", ExpectedResult = "0.1.0-foo.1+0")]
864860
[TestCase(IncrementStrategy.Major, IncrementStrategy.Major, "{BranchName}", ExpectedResult = "1.0.0-foo.1+0")]
865-
public string GetVersionWithLabelBarOnMainAndTakeAlwaysIncrementedVersion(
861+
public string GetVersionWithLabelBarAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain(
866862
IncrementStrategy incrementOnMain, IncrementStrategy increment, string? label)
867863
{
868864
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
869-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
865+
.WithPreventIncrementWhenCurrentCommitTagged(false)
870866
.WithBranch("main", _ => _.WithIncrement(incrementOnMain).WithLabel("bar"))
871867
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
872868
.Build();

src/GitVersion.Core.Tests/TrunkBased/TrunkBasedScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public string GetVersion(IncrementStrategy increment, string? label)
5858
return fixture!.GetVersion(trunkBased).FullSemVer;
5959
}
6060

61-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
6261
[TestCase(IncrementStrategy.None, null, ExpectedResult = "0.0.0-5+0")]
6362
[TestCase(IncrementStrategy.Patch, null, ExpectedResult = "0.0.0-5+0")]
6463
[TestCase(IncrementStrategy.Minor, null, ExpectedResult = "0.0.0-5+0")]
@@ -78,10 +77,10 @@ public string GetVersion(IncrementStrategy increment, string? label)
7877
[TestCase(IncrementStrategy.Patch, "bar", ExpectedResult = "0.0.1-bar.1+1")]
7978
[TestCase(IncrementStrategy.Minor, "bar", ExpectedResult = "0.1.0-bar.1+1")]
8079
[TestCase(IncrementStrategy.Major, "bar", ExpectedResult = "1.0.0-bar.1+1")]
81-
public string GetVersionWithTakeAlwaysIncrementedVersion(IncrementStrategy increment, string? label)
80+
public string GetVersionWithPreventIncrementWhenCurrentCommitTaggedFalse(IncrementStrategy increment, string? label)
8281
{
8382
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
84-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
83+
.WithPreventIncrementWhenCurrentCommitTagged(false)
8584
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
8685
.Build();
8786

src/GitVersion.Core.Tests/TrunkBased/TrunkBasedScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ public string GetVersion(IncrementStrategy increment, string? label)
5858
return fixture!.GetVersion(trunkBased).FullSemVer;
5959
}
6060

61-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
62-
[TestCase(IncrementStrategy.None, null, ExpectedResult = "0.0.0-bar")]
63-
[TestCase(IncrementStrategy.Patch, null, ExpectedResult = "0.0.0-bar")]
64-
[TestCase(IncrementStrategy.Minor, null, ExpectedResult = "0.0.0-bar")]
65-
[TestCase(IncrementStrategy.Major, null, ExpectedResult = "0.0.0-bar")]
61+
[TestCase(IncrementStrategy.None, null, ExpectedResult = "0.0.0-bar+0")]
62+
[TestCase(IncrementStrategy.Patch, null, ExpectedResult = "0.0.0-bar+0")]
63+
[TestCase(IncrementStrategy.Minor, null, ExpectedResult = "0.0.0-bar+0")]
64+
[TestCase(IncrementStrategy.Major, null, ExpectedResult = "0.0.0-bar+0")]
6665

6766
[TestCase(IncrementStrategy.None, "", ExpectedResult = "0.0.0-1+1")]
6867
[TestCase(IncrementStrategy.Patch, "", ExpectedResult = "0.0.1-1+1")]
@@ -74,14 +73,14 @@ public string GetVersion(IncrementStrategy increment, string? label)
7473
[TestCase(IncrementStrategy.Minor, "foo", ExpectedResult = "0.1.0-foo.1+1")]
7574
[TestCase(IncrementStrategy.Major, "foo", ExpectedResult = "1.0.0-foo.1+1")]
7675

77-
[TestCase(IncrementStrategy.None, "bar", ExpectedResult = "0.0.0-bar")]
78-
[TestCase(IncrementStrategy.Patch, "bar", ExpectedResult = "0.0.0-bar")]
79-
[TestCase(IncrementStrategy.Minor, "bar", ExpectedResult = "0.0.0-bar")]
80-
[TestCase(IncrementStrategy.Major, "bar", ExpectedResult = "0.0.0-bar")]
81-
public string GetVersionWithTakeAlwaysIncrementedVersion(IncrementStrategy increment, string? label)
76+
[TestCase(IncrementStrategy.None, "bar", ExpectedResult = "0.0.0-bar+0")]
77+
[TestCase(IncrementStrategy.Patch, "bar", ExpectedResult = "0.0.0-bar+0")]
78+
[TestCase(IncrementStrategy.Minor, "bar", ExpectedResult = "0.0.0-bar+0")]
79+
[TestCase(IncrementStrategy.Major, "bar", ExpectedResult = "0.0.0-bar+0")]
80+
public string GetVersionWithPreventIncrementWhenCurrentCommitTaggedFalse(IncrementStrategy increment, string? label)
8281
{
8382
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
84-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
83+
.WithPreventIncrementWhenCurrentCommitTagged(false)
8584
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
8685
.Build();
8786

src/GitVersion.Core.Tests/TrunkBased/TrunkBasedScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public string GetVersion(IncrementStrategy increment, string? label)
5858
return fixture!.GetVersion(trunkBased).FullSemVer;
5959
}
6060

61-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
6261
[TestCase(IncrementStrategy.None, null, ExpectedResult = "0.0.0-foo.5+0")]
6362
[TestCase(IncrementStrategy.Patch, null, ExpectedResult = "0.0.0-foo.5+0")]
6463
[TestCase(IncrementStrategy.Minor, null, ExpectedResult = "0.0.0-foo.5+0")]
@@ -78,10 +77,10 @@ public string GetVersion(IncrementStrategy increment, string? label)
7877
[TestCase(IncrementStrategy.Patch, "bar", ExpectedResult = "0.0.1-bar.1+1")]
7978
[TestCase(IncrementStrategy.Minor, "bar", ExpectedResult = "0.1.0-bar.1+1")]
8079
[TestCase(IncrementStrategy.Major, "bar", ExpectedResult = "1.0.0-bar.1+1")]
81-
public string GetVersionWithTakeAlwaysIncrementedVersion(IncrementStrategy increment, string? label)
80+
public string GetVersionWithPreventIncrementWhenCurrentCommitTaggedFalse(IncrementStrategy increment, string? label)
8281
{
8382
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
84-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
83+
.WithPreventIncrementWhenCurrentCommitTagged(false)
8584
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
8685
.Build();
8786

src/GitVersion.Core.Tests/TrunkBased/TrunkBasedScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public string GetVersion(IncrementStrategy increment, string? label)
5858
return fixture!.GetVersion(trunkBased).FullSemVer;
5959
}
6060

61-
[Ignore("Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!")]
6261
[TestCase(IncrementStrategy.None, null, ExpectedResult = "0.0.0-1+0")]
6362
[TestCase(IncrementStrategy.Patch, null, ExpectedResult = "0.0.1-1+0")]
6463
[TestCase(IncrementStrategy.Minor, null, ExpectedResult = "0.1.0-1+0")]
@@ -78,10 +77,10 @@ public string GetVersion(IncrementStrategy increment, string? label)
7877
[TestCase(IncrementStrategy.Patch, "bar", ExpectedResult = "0.0.1-bar.1+0")]
7978
[TestCase(IncrementStrategy.Minor, "bar", ExpectedResult = "0.1.0-bar.1+0")]
8079
[TestCase(IncrementStrategy.Major, "bar", ExpectedResult = "1.0.0-bar.1+0")]
81-
public string GetVersionWithTakeAlwaysIncrementedVersion(IncrementStrategy increment, string? label)
80+
public string GetVersionWithPreventIncrementWhenCurrentCommitTaggedFalse(IncrementStrategy increment, string? label)
8281
{
8382
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
84-
//.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion)
83+
.WithPreventIncrementWhenCurrentCommitTagged(false)
8584
.WithBranch("feature", _ => _.WithIncrement(increment).WithLabel(label))
8685
.Build();
8786

0 commit comments

Comments
 (0)