Allow empty publish type argument in push.ps1
This commit is contained in:
Родитель
925a2215bc
Коммит
2f3856d2ba
7
push.ps1
7
push.ps1
|
@ -2,7 +2,7 @@
|
|||
#requires -version 4
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[ValidateSet('default', 'blob')]
|
||||
[ValidateSet('default', 'blob', '')]
|
||||
[string]$PublishType = 'default',
|
||||
|
||||
# used for PublishType = default
|
||||
|
@ -19,6 +19,11 @@ param(
|
|||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2
|
||||
|
||||
if (-not $PublishType) {
|
||||
Write-Warning "Skipping push because `$PublishType was empty"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($env:BUILD_IS_PERSONAL) {
|
||||
$WhatIfPreference = $true
|
||||
Write-Host -ForegroundColor Yellow 'Automatically setting -WhatIf for personal builds'
|
||||
|
|
Загрузка…
Ссылка в новой задаче