Skip to content

Commit 7e77bc3

Browse files
authored
fix: remove logging in push to powershell gallery (#407)
Co-authored-by: Pim Simons <pim.simons@codit.eu>
1 parent c40e3d8 commit 7e77bc3

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

build/psgallery-release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ stages:
142142
env:
143143
SCRIPT_PATH: '$(Build.SourcesDirectory)\build\tools\psd1-to-nuspec.ps1'
144144
- task: NuGetCommand@2
145+
displayName: 'NuGet Pack'
145146
inputs:
146147
command: 'pack'
147148
packagesToPack: '**/*.nuspec'
@@ -151,20 +152,10 @@ stages:
151152
inputs:
152153
checkLatest: true
153154
- powershell: |
154-
New-Item log.txt
155155
$nugetPackageFiles = Get-ChildItem -Path $env:ARTIFACT_DIR -Filter *.nupkg -Recurse
156156
157157
foreach ($nugetPackageFile in $nugetPackageFiles) {
158-
$fullFileName = $nugetPackageFile.FullName
159-
Write-Host "Processing '$fullFileName'"
160-
% { & "nuget" push $fullFileName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate | Out-File log.txt -Append }
161-
}
162-
163-
$log = Get-Content log.txt
164-
cat $log
165-
if ($log -match "BadRequest") {
166-
echo "##vso[task.logissue type=error]Not all PowerShell modules were pushed correctly to the PowerShell Gallery"
167-
exit 1
158+
% { & "nuget" push $fullFileName -Source $(Source) -ApiKey $(NuGet.ApiKey) -SkipDuplicate }
168159
}
169160
displayName: 'Push to PowerShell Gallery'
170161
env:

0 commit comments

Comments
 (0)