Make LTS package always not a preview (#11895)

This commit is contained in:
Dongbo Wang 2020-02-19 15:07:11 -08:00 committed by GitHub
parent 349783fe36
commit d4536cfb77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -205,9 +205,16 @@ function Test-IsPreview
param(
[parameter(Mandatory)]
[string]
$Version
$Version,
[switch]$IsLTS
)
if ($IsLTS.IsPresent) {
## If we are building a LTS package, then never consider it preview.
return $false
}
return $Version -like '*-*'
}

View file

@ -775,7 +775,7 @@ function New-UnixPackage {
}
# Determine if the version is a preview version
$IsPreview = Test-IsPreview -Version $Version
$IsPreview = Test-IsPreview -Version $Version -IsLTS:$LTS
# Preview versions have preview in the name
$Name = if($LTS) {
@ -1440,7 +1440,7 @@ function New-MacOSLauncher
[switch]$LTS
)
$IsPreview = Test-IsPreview -Version $Version
$IsPreview = Test-IsPreview -Version $Version -IsLTS:$LTS
$packageId = Get-MacOSPackageId -IsPreview:$IsPreview
# Define folder for launcher application.