File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ public VersionAndBranch FindVersion(GitVersionContext context)
10
10
{
11
11
EnsureMainTopologyConstraints ( context ) ;
12
12
13
- var hasDevelopBranch = context . Repository . FindBranch ( "develop" ) != null ;
14
-
15
- if ( hasDevelopBranch )
13
+ if ( ShouldGitHubFlowVersioningSchemeApply ( context . Repository ) )
16
14
{
17
- return new GitFlowVersionFinder ( ) . FindVersion ( context ) ;
15
+ return new GitHubFlowVersionFinder ( ) . FindVersion ( context ) ;
18
16
}
19
- return new GitHubFlowVersionFinder ( ) . FindVersion ( context ) ;
17
+
18
+ return new GitFlowVersionFinder ( ) . FindVersion ( context ) ;
19
+ }
20
+
21
+ public static bool ShouldGitHubFlowVersioningSchemeApply ( IRepository repo )
22
+ {
23
+ return repo . FindBranch ( "develop" ) == null ;
20
24
}
21
25
22
26
void EnsureMainTopologyConstraints ( GitVersionContext context )
You can’t perform that action at this time.
0 commit comments