From f98641b672aff8fd64e8b9b5daef0cb8bd721ca7 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Tue, 26 Apr 2022 14:40:37 +0100 Subject: [PATCH] (build) Use rc prerelease label When there is no prerelease label, it means we are building on the master branch, however, when we are not tagged, we still need this label, otherwise, building the packages fails. Let's use the rc (Release Candidate) label. i.e. building on develop gives us alpha packages, building on hotfix/release branches gives us beta packages, and building on master branch without a tag, gives us rc packages. --- BuildScripts/default.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BuildScripts/default.ps1 b/BuildScripts/default.ps1 index 155de3d4..b3ab3d65 100644 --- a/BuildScripts/default.ps1 +++ b/BuildScripts/default.ps1 @@ -69,8 +69,8 @@ task Run-GitVersion { $script:packageVersion = $versionInfo.LegacySemVer $script:informationalVersion = $versionInfo.InformationalVersion } else { - $script:packageVersion = "$majorMinorPatch" + $(if ($prerelease) { "-$prerelease" }) + "-$buildDate" + $(if ($counter) { "-$counter" }) - $script:informationalVersion = "$majorMinorPatch" + $(if ($prerelease) { "-$prerelease" }) + "-$buildDate-$sha" + $script:packageVersion = "$majorMinorPatch" + $(if ($prerelease) { "-$prerelease" } else { "-rc" }) + "-$buildDate" + $(if ($counter) { "-$counter" }) + $script:informationalVersion = "$majorMinorPatch" + $(if ($prerelease) { "-$prerelease" } else { "-rc" }) + "-$buildDate-$sha" } Write-Host "Assembly Semantic Version: $version"