mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Fail build when nugets aren't consolidated (#22233)
* fail build when nugets aren't consolidated * consolidate nugets * change tool install * consolidate nugets * fix message
This commit is contained in:
committed by
GitHub
parent
f41fe145fc
commit
b9367c0ca6
@@ -7,6 +7,13 @@ steps:
|
||||
submodules: true
|
||||
clean: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verifying Nuget packages for PowerToys.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNugetPackages.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for PowerToys.sln
|
||||
inputs:
|
||||
|
||||
18
.pipelines/verifyNugetPackages.ps1
Normal file
18
.pipelines/verifyNugetPackages.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
[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
|
||||
Reference in New Issue
Block a user