forked from loafle/openapi-generator-original
Merge branch 'master' of https://github.com/openapitools/openapi-generator
This commit is contained in:
commit
227fb50b2b
@ -1,8 +1,10 @@
|
||||
{{> partial_header}}
|
||||
version: 1.0.{build}
|
||||
image:
|
||||
- Visual Studio 2017 # PS 5.x
|
||||
- Ubuntu # PS 6.x
|
||||
- Visual Studio 2019 # PS 6.x
|
||||
#- Visual Studio 2017 # PS 5.x
|
||||
#- Ubuntu # PS 6.x
|
||||
# ref: https://www.appveyor.com/docs/build-environment/#build-worker-images
|
||||
install:
|
||||
- ps: $PSVersionTable.PSVersion
|
||||
- ps: Install-Module Pester -Force -Scope CurrentUser
|
||||
@ -16,13 +18,15 @@ test_script:
|
||||
}
|
||||
deploy_script:
|
||||
- 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 2019") {
|
||||
.\Build.ps1
|
||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\{{{packageName}}}\ -Confirm:$False -Verbose
|
||||
if ($LastExitCode -ne 0) {
|
||||
try {
|
||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\{{{packageName}}}\ -Confirm:$False -Verbose
|
||||
Write-Host "Successfully published the PowerShell module."
|
||||
} catch {
|
||||
$host.SetShouldExit($LastExitCode)
|
||||
Write-Host "Error when running Publish-Module:"
|
||||
Write-Host $_
|
||||
exit
|
||||
} else {
|
||||
Write-Host "Published the PowerShell module."
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,10 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
image:
|
||||
- Visual Studio 2017 # PS 5.x
|
||||
- Ubuntu # PS 6.x
|
||||
- Visual Studio 2019 # PS 6.x
|
||||
#- Visual Studio 2017 # PS 5.x
|
||||
#- Ubuntu # PS 6.x
|
||||
# ref: https://www.appveyor.com/docs/build-environment/#build-worker-images
|
||||
install:
|
||||
- ps: $PSVersionTable.PSVersion
|
||||
- ps: Install-Module Pester -Force -Scope CurrentUser
|
||||
@ -22,13 +24,15 @@ test_script:
|
||||
}
|
||||
deploy_script:
|
||||
- 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 2019") {
|
||||
.\Build.ps1
|
||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose
|
||||
if ($LastExitCode -ne 0) {
|
||||
try {
|
||||
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose
|
||||
Write-Host "Successfully published the PowerShell module."
|
||||
} catch {
|
||||
$host.SetShouldExit($LastExitCode)
|
||||
Write-Host "Error when running Publish-Module:"
|
||||
Write-Host $_
|
||||
exit
|
||||
} else {
|
||||
Write-Host "Published the PowerShell module."
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user