dotnet-installer/eng/common/post-build/nuget-validation.ps1
dotnet-maestro[bot] 0b50c1bd88
[master] Update dependencies from dotnet/arcade (#6414)
* Update dependencies from https://github.com/dotnet/arcade build 20200214.5

- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20114.5

* Update dependencies from https://github.com/dotnet/arcade build 20200215.1

- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20115.1
2020-02-16 13:44:22 +00:00

24 lines
931 B
PowerShell

# This script validates NuGet package metadata information using this
# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
param(
[Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
)
try {
. $PSScriptRoot\post-build-utils.ps1
$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'
New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
ExitWithExitCode 1
}