Skip to content

Commit

Permalink
removed logging to see if the logging causes the error
Browse files Browse the repository at this point in the history
  • Loading branch information
pim-simons committed Jul 13, 2023
1 parent c40e3d8 commit 9f8a65d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions build/psgallery-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ stages:
env:
SCRIPT_PATH: '$(Build.SourcesDirectory)\build\tools\psd1-to-nuspec.ps1'
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
command: 'pack'
packagesToPack: '**/*.nuspec'
Expand All @@ -151,20 +152,10 @@ stages:
inputs:
checkLatest: true
- powershell: |
New-Item log.txt
$nugetPackageFiles = Get-ChildItem -Path $env:ARTIFACT_DIR -Filter *.nupkg -Recurse
foreach ($nugetPackageFile in $nugetPackageFiles) {
$fullFileName = $nugetPackageFile.FullName
Write-Host "Processing '$fullFileName'"
% { & "nuget" push $fullFileName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate | Out-File log.txt -Append }
}
$log = Get-Content log.txt
cat $log
if ($log -match "BadRequest") {
echo "##vso[task.logissue type=error]Not all PowerShell modules were pushed correctly to the PowerShell Gallery"
exit 1
% { & "nuget" push $fullFileName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate }
}
displayName: 'Push to PowerShell Gallery'
env:
Expand Down

0 comments on commit 9f8a65d

Please sign in to comment.