Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/check-nuget-package-published.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ try {
if ($null -eq $response.versions) {
throw "No versions returned for NuGet $id by the private feed."
}
if ($response.versions -isnot [array] -or @($response.versions | Where-Object {
$_ -isnot [string] -or $_ -notmatch '^\d[\w\.\-]*$'
}).Count -gt 0) {
throw "Invalid version list returned for NuGet $id by the private feed."
}
$alreadyPublished = $response.versions -contains $version
}
catch {
Expand All @@ -81,4 +86,4 @@ if ($alreadyPublished) {
else {
Write-Host "NuGet $id $version not found in the private feed; will publish via ESRP."
}
Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())"
Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())"
Loading