@@ -222,4 +222,80 @@ public void TagOnHotfixShouldNotAffectDevelop()
222
222
fixture . AssertFullSemver ( "1.3.0-alpha.2" ) ;
223
223
}
224
224
}
225
+
226
+ public void CommitsSinceVersionSourceShouldNotGoDownUponGitFlowReleaseFinish ( )
227
+ {
228
+ var config = new Config
229
+ {
230
+ VersioningMode = VersioningMode . ContinuousDeployment
231
+ } ;
232
+
233
+ using ( var fixture = new EmptyRepositoryFixture ( ) )
234
+ {
235
+ fixture . MakeACommit ( ) ;
236
+ fixture . ApplyTag ( "1.1.0" ) ;
237
+ fixture . BranchTo ( "develop" ) ;
238
+ fixture . MakeACommit ( "commit in develop - 1" ) ;
239
+ fixture . AssertFullSemver ( "1.2.0-alpha.1" ) ;
240
+ fixture . BranchTo ( "release/1.2.0" ) ;
241
+ fixture . AssertFullSemver ( "1.2.0-beta.1+0" ) ;
242
+ fixture . Checkout ( "develop" ) ;
243
+ fixture . MakeACommit ( "commit in develop - 2" ) ;
244
+ fixture . MakeACommit ( "commit in develop - 3" ) ;
245
+ fixture . MakeACommit ( "commit in develop - 4" ) ;
246
+ fixture . MakeACommit ( "commit in develop - 5" ) ;
247
+ fixture . AssertFullSemver ( "1.3.0-alpha.4" ) ;
248
+ fixture . Checkout ( "release/1.2.0" ) ;
249
+ fixture . MakeACommit ( "commit in release/1.2.0 - 1" ) ;
250
+ fixture . MakeACommit ( "commit in release/1.2.0 - 2" ) ;
251
+ fixture . MakeACommit ( "commit in release/1.2.0 - 3" ) ;
252
+ fixture . AssertFullSemver ( "1.2.0-beta.1+3" ) ;
253
+ fixture . Checkout ( "master" ) ;
254
+ fixture . MergeNoFF ( "release/1.2.0" ) ;
255
+ fixture . ApplyTag ( "1.2.0" ) ;
256
+ fixture . Checkout ( "develop" ) ;
257
+ fixture . MergeNoFF ( "release/1.2.0" ) ;
258
+ fixture . MakeACommit ( "commit in develop - 6" ) ;
259
+ fixture . AssertFullSemver ( "1.3.0-alpha.9" ) ;
260
+ fixture . SequenceDiagram . Destroy ( "release/1.2.0" ) ;
261
+ fixture . Repository . Branches . Remove ( "release/1.2.0" ) ;
262
+
263
+ var expectedFullSemVer = "1.3.0-alpha.9" ;
264
+ fixture . AssertFullSemver ( config , expectedFullSemVer ) ;
265
+ }
266
+ }
267
+
268
+ [ Test ]
269
+ public void CommitsSinceVersionSourceShouldNotGoDownUponMergingFeatureOnlyToDevelop ( )
270
+ {
271
+ var config = new Config
272
+ {
273
+ VersioningMode = VersioningMode . ContinuousDeployment
274
+ } ;
275
+
276
+ using ( var fixture = new EmptyRepositoryFixture ( ) )
277
+ {
278
+ fixture . MakeACommit ( "commit in master - 1" ) ;
279
+ fixture . ApplyTag ( "1.1.0" ) ;
280
+ fixture . BranchTo ( "develop" ) ;
281
+ fixture . MakeACommit ( "commit in develop - 1" ) ;
282
+ fixture . AssertFullSemver ( "1.2.0-alpha.1" ) ;
283
+ fixture . BranchTo ( "release/1.2.0" ) ;
284
+ fixture . MakeACommit ( "commit in release - 1" ) ;
285
+ fixture . MakeACommit ( "commit in release - 2" ) ;
286
+ fixture . MakeACommit ( "commit in release - 3" ) ;
287
+ fixture . AssertFullSemver ( "1.2.0-beta.1+3" ) ;
288
+ fixture . ApplyTag ( "1.2.0" ) ;
289
+ fixture . Checkout ( "develop" ) ;
290
+ fixture . MakeACommit ( "commit in develop - 2" ) ;
291
+ fixture . AssertFullSemver ( "1.3.0-alpha.1" ) ;
292
+ fixture . MergeNoFF ( "release/1.2.0" ) ;
293
+ fixture . AssertFullSemver ( "1.3.0-alpha.5" ) ;
294
+ fixture . SequenceDiagram . Destroy ( "release/1.2.0" ) ;
295
+ fixture . Repository . Branches . Remove ( "release/1.2.0" ) ;
296
+
297
+ var expectedFullSemVer = "1.3.0-alpha.5" ;
298
+ fixture . AssertFullSemver ( config , expectedFullSemVer ) ;
299
+ }
300
+ }
225
301
}
0 commit comments