I just got this exception when try to run the GitVersion on my main branch, the GitVersion.yml using Mainline for the version mode. Spent hours and couldn't figout the issue. Whole messsage is like below:
System.NotSupportedException: Mainline development does not support more than one merge source in a single commit yet at GitVersion.VersionCalculation.MainlineVersionCalculator.GetMergedHead(ICommit mergeCommit) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\MainlineVersionCalc ulator.cs:line 310 at GitVersion.VersionCalculation.MainlineVersionCalculator.AggregateMergeCommitIncrement(ICommit commit, List1 directCommits, SemanticVersion mainlineVersion, IBranch mainline) in D
:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\MainlineVersionCalculator.cs:line 109
at GitVersion.VersionCalculation.MainlineVersionCalculator.FindMainlineModeVersion(BaseVersion baseVersion) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\Mainl
ineVersionCalculator.cs:line 64
at GitVersion.VersionCalculation.NextVersionCalculator.FindVersion() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\NextVersionCalculator.cs:line 61
at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 52
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 66`
What mean "more than one merge source in a single commit"?
Using ContinuousDelivery or ContinuousDeployment can solve the issue, but then the ContinueDeployment will increase the version very commit, ContinuousDelivery would not increase the version number, we use MajorMinorPatch as version schema.