Skip to content

Commit 357d5cc

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
update build script to have proper version for rc releases
1 parent 48d625d commit 357d5cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,12 @@ if ($packageType -eq 'msixbundle') {
544544
$productName += "-Preview"
545545
}
546546
# save preview number
547-
$previewNumber = $productVersion -replace '.*?-[a-z]+\.([0-9]+)', '$1'
547+
$previewNumber = [int]($productVersion -replace '.*?-[a-z]+\.([0-9]+)', '$1' | Out-String)
548+
$productLabel = $productVersion.Split('-')[1]
549+
if ($productLabel.StartsWith('rc')) {
550+
# if RC, we increment by 100 to ensure it's newer than the last preview
551+
$previewNumber += 100
552+
}
548553
# remove label from version
549554
$productVersion = $productVersion.Split('-')[0]
550555
# replace revision number with preview number

0 commit comments

Comments
 (0)