[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

@@ -11,7 +11,7 @@ $assets = (Invoke-RestMethod -Uri $repoUrl).assets
[System.String] $kindDownloadLink = $assets.browser_download_url -match "kind-windows-amd64$"
$destFilePath = "C:\ProgramData\kind"
$null = New-Item -Path $destFilePath -ItemType Directory -Force
$packagePath = Start-DownloadWithRetry -Url $kindDownloadLink -Name "kind.exe" -DownloadPath $destFilePath
$packagePath = Invoke-DownloadWithRetry -Url $kindDownloadLink -Path "$destFilePath\kind.exe"
#region Supply chain security - Kind
$fileHash = (Get-FileHash -Path $packagePath -Algorithm SHA256).Hash