1
+ using GitVersion . Configuration ;
1
2
using GitVersion . Core . Tests . Helpers ;
2
3
3
4
namespace GitVersion . Core . Tests . IntegrationTests ;
@@ -14,69 +15,70 @@ public void GitflowComplexExample()
14
15
const string release1Branch = "release/1.1.0" ;
15
16
const string release2Branch = "release/1.2.0" ;
16
17
const string hotfixBranch = "hotfix/hf" ;
18
+ var configuration = GitFlowConfigurationBuilder . New . Build ( ) ;
17
19
18
20
using var fixture = new BaseGitFlowRepositoryFixture ( "1.0.0" ) ;
19
- fixture . AssertFullSemver ( "1.1.0-alpha.1" ) ;
21
+ fixture . AssertFullSemver ( "1.1.0-alpha.1" , configuration ) ;
20
22
21
23
// Feature 1
22
24
fixture . BranchTo ( feature1Branch ) ;
23
25
fixture . MakeACommit ( "added feature 1" ) ;
24
- fixture . AssertFullSemver ( "1.1.0-f1.1+2" ) ;
26
+ fixture . AssertFullSemver ( "1.1.0-f1.1+2" , configuration ) ;
25
27
fixture . Checkout ( developBranch ) ;
26
28
fixture . MergeNoFF ( feature1Branch ) ;
27
29
fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ feature1Branch ] ) ;
28
- fixture . AssertFullSemver ( "1.1.0-alpha.3" ) ;
30
+ fixture . AssertFullSemver ( "1.1.0-alpha.3" , configuration ) ;
29
31
30
32
// Release 1.1.0
31
33
fixture . BranchTo ( release1Branch ) ;
32
34
fixture . MakeACommit ( "release stabilization" ) ;
33
- fixture . AssertFullSemver ( "1.1.0-beta.1+4" ) ;
35
+ fixture . AssertFullSemver ( "1.1.0-beta.1+4" , configuration ) ;
34
36
fixture . Checkout ( MainBranch ) ;
35
37
fixture . MergeNoFF ( release1Branch ) ;
36
- fixture . AssertFullSemver ( "1.1.0-5" ) ;
38
+ fixture . AssertFullSemver ( "1.1.0-5" , configuration ) ;
37
39
fixture . ApplyTag ( "1.1.0" ) ;
38
- fixture . AssertFullSemver ( "1.1.0" ) ;
40
+ fixture . AssertFullSemver ( "1.1.0" , configuration ) ;
39
41
fixture . Checkout ( developBranch ) ;
40
42
fixture . MergeNoFF ( release1Branch ) ;
41
43
fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ release1Branch ] ) ;
42
- fixture . AssertFullSemver ( "1.2.0-alpha.1" ) ;
44
+ fixture . AssertFullSemver ( "1.2.0-alpha.1" , configuration ) ;
43
45
44
46
// Feature 2
45
47
fixture . BranchTo ( feature2Branch ) ;
46
48
fixture . MakeACommit ( "added feature 2" ) ;
47
- fixture . AssertFullSemver ( "1.2.0-f2.1+2" ) ;
49
+ fixture . AssertFullSemver ( "1.2.0-f2.1+2" , configuration ) ;
48
50
fixture . Checkout ( developBranch ) ;
49
51
fixture . MergeNoFF ( feature2Branch ) ;
50
52
fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ feature2Branch ] ) ;
51
- fixture . AssertFullSemver ( "1.2.0-alpha.3" ) ;
53
+ fixture . AssertFullSemver ( "1.2.0-alpha.3" , configuration ) ;
52
54
53
55
// Release 1.2.0
54
56
fixture . BranchTo ( release2Branch ) ;
55
57
fixture . MakeACommit ( "release stabilization" ) ;
56
- fixture . AssertFullSemver ( "1.2.0-beta.1+8" ) ;
58
+ fixture . AssertFullSemver ( "1.2.0-beta.1+8" , configuration ) ;
57
59
fixture . Checkout ( MainBranch ) ;
58
60
fixture . MergeNoFF ( release2Branch ) ;
59
- fixture . AssertFullSemver ( "1.2.0-5" ) ;
61
+ fixture . AssertFullSemver ( "1.2.0-5" , configuration ) ;
60
62
fixture . ApplyTag ( "1.2.0" ) ;
61
- fixture . AssertFullSemver ( "1.2.0" ) ;
63
+ fixture . AssertFullSemver ( "1.2.0" , configuration ) ;
62
64
fixture . Checkout ( developBranch ) ;
63
65
fixture . MergeNoFF ( release2Branch ) ;
64
66
fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ release2Branch ] ) ;
65
- fixture . AssertFullSemver ( "1.3.0-alpha.1" ) ;
67
+ fixture . AssertFullSemver ( "1.3.0-alpha.1" , configuration ) ;
66
68
67
69
// Hotfix
68
70
fixture . Checkout ( MainBranch ) ;
69
71
fixture . BranchTo ( hotfixBranch ) ;
70
72
fixture . MakeACommit ( "added hotfix" ) ;
71
- fixture . AssertFullSemver ( "1.2.1-beta.1+1" ) ;
73
+ fixture . AssertFullSemver ( "1.2.1-beta.1+1" , configuration ) ;
72
74
fixture . Checkout ( MainBranch ) ;
73
75
fixture . MergeNoFF ( hotfixBranch ) ;
74
- fixture . AssertFullSemver ( "1.2.1-2" ) ;
76
+ fixture . AssertFullSemver ( "1.2.1-2" , configuration ) ;
75
77
fixture . ApplyTag ( "1.2.1" ) ;
76
- fixture . AssertFullSemver ( "1.2.1" ) ;
78
+ fixture . AssertFullSemver ( "1.2.1" , configuration ) ;
77
79
fixture . Checkout ( developBranch ) ;
78
80
fixture . MergeNoFF ( hotfixBranch ) ;
79
81
fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ hotfixBranch ] ) ;
80
- fixture . AssertFullSemver ( "1.3.0-alpha.2" ) ;
82
+ fixture . AssertFullSemver ( "1.3.0-alpha.2" , configuration ) ;
81
83
}
82
84
}
0 commit comments