From 6f42367ab82112f9b05e36ac036507b3d72f0cf6 Mon Sep 17 00:00:00 2001 From: Michael Niksa Date: Thu, 26 Aug 2021 10:58:02 -0700 Subject: [PATCH] fix version specification because nuget only likes dashes. (#11060) --- tools/PGODatabase/version.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/PGODatabase/version.ps1 b/tools/PGODatabase/version.ps1 index c6fb8f677..fb538bf34 100644 --- a/tools/PGODatabase/version.ps1 +++ b/tools/PGODatabase/version.ps1 @@ -1,6 +1,6 @@ function MakeVersion ( $major, $minor, $datetimeStamp ) { - $revision, $branch = $datetimeStamp.Split("-") + $revision, $branch = $datetimeStamp.Split("-", 2) if ( $branch -eq $null ) { @@ -71,5 +71,5 @@ function GetDatetimeStamp ( $pgoBranch ) throw "FAILED: Get forkDate" } - return $forkDate + "-" + $pgoBranch.Replace("/", "_").Replace("-", "_").Replace(".", "_") + return $forkDate + "-" + ( $pgoBranch -replace "(/|\.|@|>|<)", "-" ) } \ No newline at end of file