@@ -47,5 +47,49 @@ public void WhenReleaseBranchIsMergedIntoMasterVersionIsTakenWithIt()
47
47
result . OutputVariables [ VariableProvider . FullSemVer ] . ShouldBe ( "2.0.0+6" ) ;
48
48
}
49
49
}
50
+
51
+ [ Fact ( Skip = "Not supported yet" ) ]
52
+ public void WhenMergingReleaseBackToDevShouldNotResetBetaVersion ( )
53
+ {
54
+ using ( var fixture = new EmptyRepositoryFixture ( ) )
55
+ {
56
+ const string TaggedVersion = "1.0.3" ;
57
+ fixture . Repository . MakeATaggedCommit ( TaggedVersion ) ;
58
+ fixture . Repository . CreateBranch ( "develop" ) ;
59
+ fixture . Repository . Checkout ( "develop" ) ;
60
+
61
+ fixture . Repository . MakeCommits ( 1 ) ;
62
+
63
+ fixture . Repository . CreateBranch ( "release-2.0.0" ) ;
64
+ fixture . Repository . Checkout ( "release-2.0.0" ) ;
65
+ fixture . Repository . MakeCommits ( 1 ) ;
66
+
67
+ VerifyVersion ( fixture , "2.0.0-beta.1+1" ) ;
68
+
69
+ //tag it to bump to beta 2
70
+ fixture . Repository . ApplyTag ( "2.0.0-beta1" ) ;
71
+
72
+ fixture . Repository . MakeCommits ( 1 ) ;
73
+
74
+ VerifyVersion ( fixture , "2.0.0-beta.2+2" ) ;
75
+
76
+ //merge down to develop
77
+ fixture . Repository . Checkout ( "develop" ) ;
78
+ fixture . Repository . MergeNoFF ( "release-2.0.0" , Constants . SignatureNow ( ) ) ;
79
+
80
+ //but keep working on the release
81
+ fixture . Repository . Checkout ( "release-2.0.0" ) ;
82
+
83
+ VerifyVersion ( fixture , "2.0.0-beta.2+2" ) ;
84
+ }
85
+ }
86
+
87
+ static void VerifyVersion ( EmptyRepositoryFixture fixture , string semver )
88
+ {
89
+ var result = fixture . ExecuteGitVersion ( ) ;
90
+
91
+ result . ExitCode . ShouldBe ( 0 ) ;
92
+ result . OutputVariables [ VariableProvider . FullSemVer ] . ShouldBe ( semver ) ;
93
+ }
50
94
}
51
95
}
0 commit comments