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() =>
4343
4444 private IEnumerable < BaseVersion > MainTagsVersions ( )
4545 {
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 > ( ) ;
4853 }
4954
5055 private IEnumerable < BaseVersion > ReleaseBranchBaseVersions ( )
You can’t perform that action at this time.
0 commit comments