File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/GitVersionCore.Tests/IntegrationTests Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,30 @@ public void AllowNotHavingMaster()
45
45
}
46
46
}
47
47
48
+ [ Test ]
49
+ public void AllowHavingMainInsteadOfMaster ( )
50
+ {
51
+ var config = new Config ( ) ;
52
+ config . Branches . Add ( "main" , new BranchConfig
53
+ {
54
+ VersioningMode = VersioningMode . ContinuousDelivery ,
55
+ Tag = "useBranchName" ,
56
+ Increment = IncrementStrategy . Patch ,
57
+ PreventIncrementOfMergedBranchVersion = true ,
58
+ TrackMergeTarget = false
59
+ } ) ;
60
+
61
+ using ( var fixture = new EmptyRepositoryFixture ( config ) )
62
+ {
63
+ fixture . Repository . MakeACommit ( ) ;
64
+ fixture . Repository . Checkout ( fixture . Repository . CreateBranch ( "develop" ) ) ;
65
+ fixture . Repository . Checkout ( fixture . Repository . CreateBranch ( "main" ) ) ;
66
+ fixture . Repository . Branches . Remove ( fixture . Repository . Branches [ "master" ] ) ;
67
+
68
+ fixture . AssertFullSemver ( "0.1.0+0" ) ;
69
+ }
70
+ }
71
+
48
72
[ Test ]
49
73
public void DoNotBlowUpWhenDevelopAndFeatureBranchPointAtSameCommit ( )
50
74
{
You can’t perform that action at this time.
0 commit comments