mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
[ci]Fail when a step in multiline powershell fails (#35520)
This commit is contained in:
parent
5af2f6f825
commit
04795c6d3a
@ -143,13 +143,19 @@ jobs:
|
|||||||
|
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
& '.pipelines/applyXamlStyling.ps1' -Passive
|
& '.pipelines/applyXamlStyling.ps1' -Passive
|
||||||
|
displayName: Verify XAML formatting
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
& '.pipelines/verifyNugetPackages.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
& '.pipelines/verifyNugetPackages.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
||||||
|
displayName: Verify Nuget package versions for PowerToys.sln
|
||||||
|
|
||||||
|
- pwsh: |-
|
||||||
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
||||||
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln'
|
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln'
|
||||||
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln'
|
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln'
|
||||||
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln'
|
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln'
|
||||||
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
& '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
||||||
displayName: Verify formatting, nuget, and ARM64 configurations
|
displayName: Verify ARM64 configurations
|
||||||
|
|
||||||
- ${{ if eq(parameters.enablePackageCaching, true) }}:
|
- ${{ if eq(parameters.enablePackageCaching, true) }}:
|
||||||
- task: Cache@2
|
- task: Cache@2
|
||||||
|
@ -59,6 +59,7 @@ if ($errorTable.Count -gt 0) {
|
|||||||
};
|
};
|
||||||
Write-Host -ForegroundColor Red `r
|
Write-Host -ForegroundColor Red `r
|
||||||
}
|
}
|
||||||
|
Write-Error "Found arm64 verification errors."
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ $totalFailure = 0;
|
|||||||
Write-Host $DirPath;
|
Write-Host $DirPath;
|
||||||
|
|
||||||
if (-not (Test-Path $DirPath)) {
|
if (-not (Test-Path $DirPath)) {
|
||||||
Write-Host "Folder does not exist!"
|
Write-Error "Folder does not exist!"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Total items: " $items.Count
|
Write-Host "Total items: " $items.Count
|
||||||
@ -79,6 +79,7 @@ $items | ForEach-Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($totalFailure -gt 0) {
|
if ($totalFailure -gt 0) {
|
||||||
|
Write-Error "Some items had issues."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user