mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
[Windows] Apply code style rules to Windows scripts (#8957)
* Apply code style rules to Windows scripts * Fix typo * Fix configure-toolset script * Fix parameters in Msys2 installation script * Improve log readability * Remove broken exit code validation
This commit is contained in:
committed by
GitHub
parent
76d6f0f574
commit
7fe65a2204
@@ -14,22 +14,22 @@ $downloadUrl = Resolve-GithubReleaseAssetUrl `
|
||||
-UrlMatchPattern "stack-*-windows-x86_64.zip"
|
||||
|
||||
Write-Host "Download stack archive"
|
||||
$StackToolcachePath = Join-Path $Env:AGENT_TOOLSDIRECTORY "stack\$version"
|
||||
$DestinationPath = Join-Path $StackToolcachePath "x64"
|
||||
$StackArchivePath = Invoke-DownloadWithRetry $downloadUrl
|
||||
$stackToolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "stack\$version"
|
||||
$destinationPath = Join-Path $stackToolcachePath "x64"
|
||||
$stackArchivePath = Invoke-DownloadWithRetry $downloadUrl
|
||||
|
||||
#region Supply chain security - Stack
|
||||
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
|
||||
-Url "$downloadUrl.sha256" `
|
||||
-FileName (Split-Path $downloadUrl -Leaf)
|
||||
Test-FileChecksum $StackArchivePath -ExpectedSHA256Sum $externalHash
|
||||
Test-FileChecksum $stackArchivePath -ExpectedSHA256Sum $externalHash
|
||||
#endregion
|
||||
|
||||
Write-Host "Expand stack archive"
|
||||
Expand-7ZipArchive -Path $StackArchivePath -DestinationPath $DestinationPath
|
||||
Expand-7ZipArchive -Path $stackArchivePath -DestinationPath $destinationPath
|
||||
|
||||
New-Item -Name "x64.complete" -Path $StackToolcachePath
|
||||
New-Item -Name "x64.complete" -Path $stackToolcachePath
|
||||
|
||||
Add-MachinePathItem -PathItem $DestinationPath
|
||||
Add-MachinePathItem -PathItem $destinationPath
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Stack"
|
||||
|
||||
Reference in New Issue
Block a user