@@ -148,7 +148,6 @@ public string GetVersionWithNoLabelOnMain(
148
148
return fixture ! . GetVersion ( trunkBased ) . FullSemVer ;
149
149
}
150
150
151
- [ Ignore ( "Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!" ) ]
152
151
[ TestCase ( IncrementStrategy . None , IncrementStrategy . None , null , ExpectedResult = "0.0.0-1+0" ) ]
153
152
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Patch , null , ExpectedResult = "0.0.1-1+0" ) ]
154
153
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Minor , null , ExpectedResult = "0.1.0-1+0" ) ]
@@ -232,11 +231,11 @@ public string GetVersionWithNoLabelOnMain(
232
231
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Patch , "{BranchName}" , ExpectedResult = "0.0.1-foo.1+0" ) ]
233
232
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Minor , "{BranchName}" , ExpectedResult = "0.1.0-foo.1+0" ) ]
234
233
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Major , "{BranchName}" , ExpectedResult = "1.0.0-foo.1+0" ) ]
235
- public string GetVersionWithNoLabelOnMainAndTakeAlwaysIncrementedVersion (
234
+ public string GetVersionWithNoLabelAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain (
236
235
IncrementStrategy incrementOnMain , IncrementStrategy increment , string ? label )
237
236
{
238
237
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
239
- //.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion )
238
+ . WithPreventIncrementWhenCurrentCommitTagged ( false )
240
239
. WithBranch ( "main" , _ => _ . WithIncrement ( incrementOnMain ) . WithLabel ( null ) )
241
240
. WithBranch ( "feature" , _ => _ . WithIncrement ( increment ) . WithLabel ( label ) )
242
241
. Build ( ) ;
@@ -358,7 +357,6 @@ public string GetVersionWithEmptyLabelOnMain(
358
357
return fixture ! . GetVersion ( trunkBased ) . FullSemVer ;
359
358
}
360
359
361
- [ Ignore ( "Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!" ) ]
362
360
[ TestCase ( IncrementStrategy . None , IncrementStrategy . None , null , ExpectedResult = "0.0.0-1+0" ) ]
363
361
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Patch , null , ExpectedResult = "0.0.1-1+0" ) ]
364
362
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Minor , null , ExpectedResult = "0.1.0-1+0" ) ]
@@ -442,11 +440,11 @@ public string GetVersionWithEmptyLabelOnMain(
442
440
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Patch , "{BranchName}" , ExpectedResult = "0.0.1-foo.1+0" ) ]
443
441
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Minor , "{BranchName}" , ExpectedResult = "0.1.0-foo.1+0" ) ]
444
442
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Major , "{BranchName}" , ExpectedResult = "1.0.0-foo.1+0" ) ]
445
- public string GetVersionWithEmptyLabelOnMainAndTakeAlwaysIncrementedVersion (
443
+ public string GetVersionWithEmptyLabelAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain (
446
444
IncrementStrategy incrementOnMain , IncrementStrategy increment , string ? label )
447
445
{
448
446
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
449
- //.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion )
447
+ . WithPreventIncrementWhenCurrentCommitTagged ( false )
450
448
. WithBranch ( "main" , _ => _ . WithIncrement ( incrementOnMain ) . WithLabel ( string . Empty ) )
451
449
. WithBranch ( "feature" , _ => _ . WithIncrement ( increment ) . WithLabel ( label ) )
452
450
. Build ( ) ;
@@ -568,7 +566,6 @@ public string GetVersionWithLabelFooOnMain(
568
566
return fixture ! . GetVersion ( trunkBased ) . FullSemVer ;
569
567
}
570
568
571
- [ Ignore ( "Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!" ) ]
572
569
[ TestCase ( IncrementStrategy . None , IncrementStrategy . None , null , ExpectedResult = "0.0.0-1+0" ) ]
573
570
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Patch , null , ExpectedResult = "0.0.1-1+0" ) ]
574
571
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Minor , null , ExpectedResult = "0.1.0-1+0" ) ]
@@ -652,11 +649,11 @@ public string GetVersionWithLabelFooOnMain(
652
649
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Patch , "{BranchName}" , ExpectedResult = "0.0.1-foo.1+0" ) ]
653
650
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Minor , "{BranchName}" , ExpectedResult = "0.1.0-foo.1+0" ) ]
654
651
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Major , "{BranchName}" , ExpectedResult = "1.0.0-foo.1+0" ) ]
655
- public string GetVersionWithLabelFooOnMainAndTakeAlwaysIncrementedVersion (
652
+ public string GetVersionWithLabelFooAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain (
656
653
IncrementStrategy incrementOnMain , IncrementStrategy increment , string ? label )
657
654
{
658
655
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
659
- //.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion )
656
+ . WithPreventIncrementWhenCurrentCommitTagged ( false )
660
657
. WithBranch ( "main" , _ => _ . WithIncrement ( incrementOnMain ) . WithLabel ( "foo" ) )
661
658
. WithBranch ( "feature" , _ => _ . WithIncrement ( increment ) . WithLabel ( label ) )
662
659
. Build ( ) ;
@@ -778,7 +775,6 @@ public string GetVersionWithLabelBarOnMain(
778
775
return fixture ! . GetVersion ( trunkBased ) . FullSemVer ;
779
776
}
780
777
781
- [ Ignore ( "Enable if WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion) feature has been implemented!" ) ]
782
778
[ TestCase ( IncrementStrategy . None , IncrementStrategy . None , null , ExpectedResult = "0.0.0-1+0" ) ]
783
779
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Patch , null , ExpectedResult = "0.0.1-1+0" ) ]
784
780
[ TestCase ( IncrementStrategy . None , IncrementStrategy . Minor , null , ExpectedResult = "0.1.0-1+0" ) ]
@@ -862,11 +858,11 @@ public string GetVersionWithLabelBarOnMain(
862
858
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Patch , "{BranchName}" , ExpectedResult = "0.0.1-foo.1+0" ) ]
863
859
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Minor , "{BranchName}" , ExpectedResult = "0.1.0-foo.1+0" ) ]
864
860
[ TestCase ( IncrementStrategy . Major , IncrementStrategy . Major , "{BranchName}" , ExpectedResult = "1.0.0-foo.1+0" ) ]
865
- public string GetVersionWithLabelBarOnMainAndTakeAlwaysIncrementedVersion (
861
+ public string GetVersionWithLabelBarAndPreventIncrementWhenCurrentCommitTaggedFalseOnMain (
866
862
IncrementStrategy incrementOnMain , IncrementStrategy increment , string ? label )
867
863
{
868
864
IGitVersionConfiguration trunkBased = TrunkBasedBuilder
869
- //.WithTakeIncrementedVersion(TakeIncrementedVersion.TakeAlwaysIncrementedVersion )
865
+ . WithPreventIncrementWhenCurrentCommitTagged ( false )
870
866
. WithBranch ( "main" , _ => _ . WithIncrement ( incrementOnMain ) . WithLabel ( "bar" ) )
871
867
. WithBranch ( "feature" , _ => _ . WithIncrement ( increment ) . WithLabel ( label ) )
872
868
. Build ( ) ;
0 commit comments