From ebd7c5d55a404f2dbd0d9ecaf4cc05dc687a152c Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 1 May 2018 11:09:00 +1000 Subject: [PATCH] build.ps1 - Stip off -pre from Assembly version --- build.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index a0367014a..5af517684 100644 --- a/build.ps1 +++ b/build.ps1 @@ -36,9 +36,14 @@ if (Test-Path Env:\APPVEYOR_BUILD_VERSION) if ($env:APPVEYOR_REPO_TAG -eq "True") { $Version = "$env:APPVEYOR_REPO_TAG_NAME".Substring(1) # trim leading "v" - $AssemblyVersion = $Version + $AssemblyVersion = $Version + #Stip the -pre + if($AssemblyVersion.Contains("-pre")) + { + $AssemblyVersion = $AssemblyVersion.Substring(0, $AssemblyVersion.IndexOf("-pre")) + } Write-Diagnostic "Setting Version based on tag to $Version" - Write-Diagnostic "Setting AssemblyVersion based on tag to $AssemblyVersion" + Write-Diagnostic "Setting AssemblyVersion based on tag to $AssemblyVersion" } # https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1