PowerToys/.pipelines/verifyNugetPackages.ps1
Davide Giacometti b9367c0ca6
Fail build when nugets aren't consolidated (#22233)
* fail build when nugets aren't consolidated

* consolidate nugets

* change tool install

* consolidate nugets

* fix message
2022-11-24 20:45:51 +01:00

19 lines
338 B
PowerShell

[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$solution
)
Write-Host "Verifying Nuget packages for $solution"
dotnet tool restore
dotnet consolidate -s $solution
if (-not $?)
{
Write-Host -ForegroundColor Red "Nuget packages with the same name must all be the same version."
exit 1
}
exit 0