Skip to content

Commit 281dd0c

Browse files
authored
chore: update w/ ps release verification (#375)
1 parent 2136433 commit 281dd0c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

build/psgallery-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,14 @@ stages:
150150
displayName: 'Install NuGet'
151151
- powershell: |
152152
Get-ChildItem -Path $env:ARTIFACT_DIR -Filter *.nupkg -Recurse |
153-
% { & "nuget" push $_.FullName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate }
153+
% { & "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+
}
154161
displayName: 'Push to PowerShell Gallery'
155162
env:
156163
ARTIFACT_DIR: '$(Build.ArtifactStagingDirectory)'

0 commit comments

Comments
 (0)