File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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:
You can’t perform that action at this time.
0 commit comments