Allow empty publish type argument in push.ps1

This commit is contained in:
Nate McMaster 2017-11-21 11:43:21 -08:00
Родитель 925a2215bc
Коммит 2f3856d2ba
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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'