File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/GitVersion.Core/VersionCalculation/BaseVersionCalculators Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,13 @@ public override IEnumerable<BaseVersion> GetVersions() =>
43
43
44
44
private IEnumerable < BaseVersion > MainTagsVersions ( )
45
45
{
46
- var main = this . repositoryStore . FindBranch ( Config . MainBranchKey ) ;
47
- return main != null ? this . taggedCommitVersionStrategy . GetTaggedVersions ( main , null ) : Array . Empty < BaseVersion > ( ) ;
46
+ var main = this . repositoryStore . FindBranch ( Config . MainBranchKey )
47
+ // For compatibility reason try to find `master` if `main` cannot be found
48
+ ?? this . repositoryStore . FindBranch ( Config . MasterBranchKey ) ;
49
+
50
+ return main != null
51
+ ? this . taggedCommitVersionStrategy . GetTaggedVersions ( main , null )
52
+ : Array . Empty < BaseVersion > ( ) ;
48
53
}
49
54
50
55
private IEnumerable < BaseVersion > ReleaseBranchBaseVersions ( )
You can’t perform that action at this time.
0 commit comments