@@ -60,7 +60,7 @@ public void CanTakeVersionFromHotfixesBranch()
60
60
61
61
// create hotfix branch
62
62
Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "hotfixes/1.1.1" ) ) ;
63
- fixture . AssertFullSemver ( "1.1.0" ) ; // We are still on a tagged commit
63
+ fixture . AssertFullSemver ( "1.1.1+ 0" ) ;
64
64
fixture . Repository . MakeACommit ( ) ;
65
65
66
66
fixture . AssertFullSemver ( "1.1.1-beta.1+1" ) ;
@@ -78,44 +78,44 @@ public void PatchOlderReleaseExample()
78
78
r . MakeATaggedCommit ( "2.0.0" ) ;
79
79
} ) ;
80
80
// Merge hotfix branch to support
81
- Commands . Checkout ( fixture . Repository , MainBranch ) ;
81
+ fixture . Checkout ( MainBranch ) ;
82
82
var tag = fixture . Repository . Tags . Single ( t => t . FriendlyName == "1.1.0" ) ;
83
- var supportBranch = fixture . Repository . CreateBranch ( "support-1.1" , ( LibGit2Sharp . Commit ) tag . Target ) ;
84
- Commands . Checkout ( fixture . Repository , supportBranch ) ;
83
+ fixture . Repository . CreateBranch ( "support-1.1" , ( LibGit2Sharp . Commit ) tag . Target ) ;
84
+ fixture . Checkout ( "support-1.1" ) ;
85
85
fixture . AssertFullSemver ( "1.1.0" ) ;
86
86
87
87
// create hotfix branch
88
- Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "hotfix-1.1.1" ) ) ;
89
- fixture . AssertFullSemver ( "1.1.0" ) ; // We are still on a tagged commit
90
- fixture . Repository . MakeACommit ( ) ;
88
+ fixture . BranchTo ( "hotfix-1.1.1" ) ;
89
+ fixture . AssertFullSemver ( "1.1.1+ 0" ) ;
90
+ fixture . MakeACommit ( ) ;
91
91
92
92
fixture . AssertFullSemver ( "1.1.1-beta.1+1" ) ;
93
- fixture . Repository . MakeACommit ( ) ;
93
+ fixture . MakeACommit ( ) ;
94
94
fixture . AssertFullSemver ( "1.1.1-beta.1+2" ) ;
95
95
96
96
// Create feature branch off hotfix branch and complete
97
- Commands . Checkout ( fixture . Repository , fixture . Repository . CreateBranch ( "feature/fix" ) ) ;
97
+ fixture . BranchTo ( "feature/fix" ) ;
98
98
fixture . AssertFullSemver ( "1.1.1-fix.1+2" ) ;
99
- fixture . Repository . MakeACommit ( ) ;
99
+ fixture . MakeACommit ( ) ;
100
100
fixture . AssertFullSemver ( "1.1.1-fix.1+3" ) ;
101
101
102
102
fixture . Repository . CreatePullRequestRef ( "feature/fix" , "hotfix-1.1.1" , prNumber : 8 , normalise : true ) ;
103
103
fixture . AssertFullSemver ( "1.1.1-PullRequest8.4" ) ;
104
- Commands . Checkout ( fixture . Repository , "hotfix-1.1.1" ) ;
105
- fixture . Repository . MergeNoFF ( "feature/fix" , Generate . SignatureNow ( ) ) ;
104
+ fixture . Checkout ( "hotfix-1.1.1" ) ;
105
+ fixture . MergeNoFF ( "feature/fix" ) ;
106
106
fixture . AssertFullSemver ( "1.1.1-beta.1+4" ) ;
107
107
108
108
// Merge hotfix into support branch to complete hotfix
109
- Commands . Checkout ( fixture . Repository , "support-1.1" ) ;
110
- fixture . Repository . MergeNoFF ( "hotfix-1.1.1" , Generate . SignatureNow ( ) ) ;
109
+ fixture . Checkout ( "support-1.1" ) ;
110
+ fixture . MergeNoFF ( "hotfix-1.1.1" ) ;
111
111
fixture . AssertFullSemver ( "1.1.1+5" ) ;
112
- fixture . Repository . ApplyTag ( "1.1.1" ) ;
112
+ fixture . ApplyTag ( "1.1.1" ) ;
113
113
fixture . AssertFullSemver ( "1.1.1" ) ;
114
114
115
115
// Verify develop version
116
- Commands . Checkout ( fixture . Repository , "develop" ) ;
116
+ fixture . Checkout ( "develop" ) ;
117
117
fixture . AssertFullSemver ( "2.1.0-alpha.1" ) ;
118
- fixture . Repository . MergeNoFF ( "support-1.1" , Generate . SignatureNow ( ) ) ;
118
+ fixture . MergeNoFF ( "support-1.1" ) ;
119
119
fixture . AssertFullSemver ( "2.1.0-alpha.7" ) ;
120
120
}
121
121
@@ -167,7 +167,7 @@ public void FeatureOnHotfixFeatureBranchDeleted()
167
167
fixture . Checkout ( hotfix451 ) ;
168
168
fixture . MergeNoFF ( featureBranch ) ; // commit 2
169
169
fixture . Repository . Branches . Remove ( featureBranch ) ;
170
- fixture . AssertFullSemver ( "4.5.1-beta.2 " , configuration ) ;
170
+ fixture . AssertFullSemver ( "4.5.1-beta.3 " , configuration ) ;
171
171
}
172
172
173
173
/// <summary>
@@ -217,7 +217,8 @@ public void FeatureOnHotfixFeatureBranchNotDeleted()
217
217
fixture . MakeACommit ( "blabla" ) ; // commit 1
218
218
fixture . Checkout ( hotfix451 ) ;
219
219
fixture . MergeNoFF ( featureBranch ) ; // commit 2
220
- fixture . AssertFullSemver ( "4.5.1-beta.2" , configuration ) ;
220
+
221
+ fixture . AssertFullSemver ( "4.5.1-beta.3" , configuration ) ;
221
222
}
222
223
223
224
[ Test ]
0 commit comments