From ef8971d7ac202336b5f466e15cea4a4a8a8149a9 Mon Sep 17 00:00:00 2001 From: Dylan Reisenberger Date: Fri, 27 Dec 2019 16:19:43 +0000 Subject: [PATCH] Tweak AppVeyor build numbering to avoid failed builds (#738) Closes #737 --- build.cake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index d122820e378..4e2377c583e 100644 --- a/build.cake +++ b/build.cake @@ -144,7 +144,9 @@ Task("__UpdateAssemblyVersionInformation") Information("FullSemVer -> {0}", gitVersionOutput["FullSemVer"]); Information("AssemblySemVer -> {0}", gitVersionOutput["AssemblySemVer"]); - appveyorBuildNumber = gitVersionOutput["FullSemVer"].ToString(); + appveyorBuildNumber = gitVersionOutput["BranchName"].ToString().Equals("master", StringComparison.OrdinalIgnoreCase) + ? gitVersionOutput["FullSemVer"].ToString() + : gitVersionOutput["InformationalVersion"].ToString(); nugetVersion = gitVersionOutput["NuGetVersion"].ToString(); assemblyVersion = gitVersionOutput["Major"].ToString() + ".0.0.0"; assemblySemver = gitVersionOutput["AssemblySemVer"].ToString();