File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
src/GitVersionCore.Tests/VersionCalculation Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,36 @@ public void PreReleaseTagCanUseBranchName()
117
117
fixture . AssertFullSemver ( "1.0.0-foo.1+2" , config ) ;
118
118
}
119
119
120
+ [ Test ]
121
+ public void PreReleaseTagCanUseBranchNameMainline ( )
122
+ {
123
+ var config = new Config
124
+ {
125
+ VersioningMode = VersioningMode . Mainline ,
126
+ NextVersion = "1.0.0" ,
127
+ Branches = new Dictionary < string , BranchConfig >
128
+ {
129
+ {
130
+ "custom" , new BranchConfig
131
+ {
132
+ Regex = "custom/" ,
133
+ Tag = "useBranchName" ,
134
+ SourceBranches = new HashSet < string > ( )
135
+ }
136
+ }
137
+ }
138
+ } ;
139
+
140
+ using var fixture = new EmptyRepositoryFixture ( ) ;
141
+ fixture . MakeACommit ( ) ;
142
+ fixture . BranchTo ( "develop" ) ;
143
+ fixture . MakeACommit ( ) ;
144
+ fixture . BranchTo ( "custom/foo" ) ;
145
+ fixture . MakeACommit ( ) ;
146
+
147
+ fixture . AssertFullSemver ( "1.0.0-foo.1.2" , config ) ;
148
+ }
149
+
120
150
[ Test ]
121
151
public void PreReleaseTagCanUseBranchNameVariable ( )
122
152
{
You can’t perform that action at this time.
0 commit comments