forked from loafle/openapi-generator-original
better error handling when publishing module (#7131)
This commit is contained in:
parent
f752f29af2
commit
be02a33c72
@ -18,12 +18,10 @@ deploy_script:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
|
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
|
||||||
.\Build.ps1
|
.\Build.ps1
|
||||||
choco install NuGet.CommandLine
|
|
||||||
Install-PackageProvider -Name NuGet -Force
|
|
||||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\{{{packageName}}}\ -Confirm:$False -Verbose
|
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\{{{packageName}}}\ -Confirm:$False -Verbose
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
$host.SetShouldExit($LastExitCode)
|
$host.SetShouldExit($LastExitCode)
|
||||||
exit $LastExitCode
|
exit
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Published the PowerShell module."
|
Write-Host "Published the PowerShell module."
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,10 @@ deploy_script:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
|
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
|
||||||
.\Build.ps1
|
.\Build.ps1
|
||||||
choco install NuGet.CommandLine
|
|
||||||
Install-PackageProvider -Name NuGet -Force
|
|
||||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose
|
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
$host.SetShouldExit($LastExitCode)
|
$host.SetShouldExit($LastExitCode)
|
||||||
exit $LastExitCode
|
exit
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Published the PowerShell module."
|
Write-Host "Published the PowerShell module."
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user