File tree 2 files changed +20
-8
lines changed
modules/openapi-generator/src/main/resources/powershell
samples/client/petstore/powershell
2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ version: 1.0.{build}
3
3
image:
4
4
- Visual Studio 2017 # PS 5.x
5
5
- Ubuntu # PS 6.x
6
- - macOS # PS 6.x
7
6
install:
8
7
- ps: $PSVersionTable.PSVersion
9
8
- ps: Install-Module Pester -Force -Scope CurrentUser
@@ -15,10 +14,17 @@ test_script:
15
14
$host .SetShouldExit($Result .FailedCount)
16
15
exit $Result .FailedCount
17
16
}
17
+ deploy_script:
18
18
- ps: |
19
- if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null)
20
- {
19
+ if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
20
+ .\Build.ps1
21
21
choco install NuGet.CommandLine
22
22
Install-PackageProvider -Name NuGet -Force
23
- Publish-Module -NuGetApiKey $env :NuGetApiKey -Path .\ -Confirm:$False -Verbose
23
+ Publish-Module -NuGetApiKey $env :NuGetApiKey -Path .\src\{{{packageName} }}\ -Confirm:$False -Verbose
24
+ if ($LastExitCode -ne 0) {
25
+ $host .SetShouldExit($LastExitCode )
26
+ exit $LastExitCode
27
+ } else {
28
+ Write-Host " Published the PowerShell module."
29
+ }
24
30
}
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ version: 1.0.{build}
9
9
image :
10
10
- Visual Studio 2017 # PS 5.x
11
11
- Ubuntu # PS 6.x
12
- - macOS # PS 6.x
13
12
install :
14
13
- ps : $PSVersionTable.PSVersion
15
14
- ps : Install-Module Pester -Force -Scope CurrentUser
@@ -21,10 +20,17 @@ test_script:
21
20
$host.SetShouldExit($Result.FailedCount)
22
21
exit $Result.FailedCount
23
22
}
23
+ deploy_script :
24
24
- ps : |
25
- if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null)
26
- {
25
+ if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
26
+ .\Build.ps1
27
27
choco install NuGet.CommandLine
28
28
Install-PackageProvider -Name NuGet -Force
29
- Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\ -Confirm:$False -Verbose
29
+ Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose
30
+ if ($LastExitCode -ne 0) {
31
+ $host.SetShouldExit($LastExitCode)
32
+ exit $LastExitCode
33
+ } else {
34
+ Write-Host "Published the PowerShell module."
35
+ }
30
36
}
You can’t perform that action at this time.
0 commit comments