[Windows] Rename and refactor downloading function (#8906)

This commit is contained in:
Vasilii Polikarpov
2023-11-29 13:02:29 +01:00
committed by GitHub
parent bfe32a2b12
commit 7dba8776df
32 changed files with 105 additions and 130 deletions

View File

@@ -18,7 +18,7 @@ if (Test-IsWin19) {
throw "Unknown architecture $_"
}
$packagePath = Start-DownloadWithRetry -Url $url -Name "$_.7z"
$packagePath = Invoke-DownloadWithRetry $url
$hash = Get-FileHash -Path $packagePath -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
throw "Checksum verification failed for $packagePath"
@@ -55,7 +55,7 @@ if (Test-IsWin19) {
-Version "$version" `
-Asset "$arch-*-release-$threads-$exceptions-$runtime-*.7z"
$packagePath = Start-DownloadWithRetry -Url $url -Name "$_.7z"
$packagePath = Invoke-DownloadWithRetry $url
Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\"
# Make a copy of mingw-make.exe to make.exe, which is a more discoverable name