From 7e77bc3990599ed1a698d32ef3b47abef1c1279e Mon Sep 17 00:00:00 2001 From: Pim Simons <32359437+pim-simons@users.noreply.github.com> Date: Fri, 14 Jul 2023 08:24:07 +0200 Subject: [PATCH] fix: remove logging in push to powershell gallery (#407) Co-authored-by: Pim Simons --- build/psgallery-release.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build/psgallery-release.yml b/build/psgallery-release.yml index e773900e..2fc71e2c 100644 --- a/build/psgallery-release.yml +++ b/build/psgallery-release.yml @@ -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' @@ -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: