@@ -409,6 +409,50 @@ public void MergingFeatureBranchThatIncrementsMinorNumberIncrementsMinorVersionO
409
409
fixture . AssertFullSemver ( currentConfig , "1.1.0" ) ;
410
410
}
411
411
412
+ [ Test ]
413
+ public void MergingMasterBarnchToDevelopWithInheritIncrementShouldIncrementDevelopPatch ( )
414
+ {
415
+ var currentConfig = new Config
416
+ {
417
+ AssemblyVersioningScheme = AssemblyVersioningScheme . MajorMinorPatch ,
418
+ VersioningMode = VersioningMode . Mainline ,
419
+ Branches = new Dictionary < string , BranchConfig >
420
+ {
421
+ {
422
+ "master" , new BranchConfig
423
+ {
424
+ Increment = IncrementStrategy . Patch
425
+ }
426
+ } ,
427
+ {
428
+ "develop" , new BranchConfig
429
+ {
430
+ Increment = IncrementStrategy . Inherit
431
+ }
432
+ }
433
+ }
434
+ } ;
435
+
436
+ using var fixture = new EmptyRepositoryFixture ( ) ;
437
+ fixture . MakeACommit ( "initial in master" ) ;
438
+ fixture . AssertFullSemver ( currentConfig , "0.1.0" ) ;
439
+ fixture . MakeACommit ( "master change" ) ;
440
+ fixture . AssertFullSemver ( currentConfig , "0.1.1" ) ;
441
+
442
+ fixture . BranchTo ( "develop" ) ;
443
+ fixture . AssertFullSemver ( currentConfig , "0.1.2-alpha.0" ) ;
444
+ fixture . MakeACommit ( "develop change" ) ;
445
+ fixture . AssertFullSemver ( currentConfig , "0.1.2-alpha.1" ) ;
446
+
447
+ fixture . Checkout ( "master" ) ;
448
+ fixture . MakeACommit ( "master hotfix" ) ;
449
+ fixture . AssertFullSemver ( currentConfig , "0.1.2" ) ;
450
+
451
+ fixture . Checkout ( "develop" ) ;
452
+ fixture . MergeNoFF ( "master" ) ;
453
+ fixture . AssertFullSemver ( currentConfig , "0.1.3-alpha.1" ) ;
454
+ }
455
+
412
456
[ Test ]
413
457
public void VerifyIncrementConfigIsHonoured ( )
414
458
{
0 commit comments