We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2136433 commit 281dd0cCopy full SHA for 281dd0c
1 file changed
build/psgallery-release.yml
@@ -150,7 +150,14 @@ stages:
150
displayName: 'Install NuGet'
151
- powershell: |
152
Get-ChildItem -Path $env:ARTIFACT_DIR -Filter *.nupkg -Recurse |
153
- % { & "nuget" push $_.FullName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate }
+ % { & "nuget" push $_.FullName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate | Out-File log.txt -Append }
154
+
155
+ $log = Get-Content log.txt
156
+ cat $log
157
+ if ($log -match "BadRequest") {
158
+ echo "##vso[task.logissue type=error]Not all PowerShell modules were pushed correctly to the PowerShell Gallery"
159
+ exit 1
160
+ }
161
displayName: 'Push to PowerShell Gallery'
162
env:
163
ARTIFACT_DIR: '$(Build.ArtifactStagingDirectory)'
0 commit comments