Merge pull request #5217 from alepauly/ale/kubFix

Fix match regex in Kubernetes tools downloads.
This commit is contained in:
Alejandro Pauly
2022-03-10 09:39:16 -05:00
committed by GitHub

View File

@@ -6,7 +6,7 @@
Write-Host "Install Kind" Write-Host "Install Kind"
# Choco installation can't be used because it depends on docker-desktop # Choco installation can't be used because it depends on docker-desktop
$url = 'https://api.github.com/repos/kubernetes-sigs/kind/releases/latest' $url = 'https://api.github.com/repos/kubernetes-sigs/kind/releases/latest'
[System.String] $kindDownloadLink = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kind-windows-amd64" [System.String] $kindDownloadLink = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kind-windows-amd64$"
$destFilePath = "C:\ProgramData\kind" $destFilePath = "C:\ProgramData\kind"
$null = New-Item -Path $destFilePath -ItemType Directory -Force $null = New-Item -Path $destFilePath -ItemType Directory -Force
Start-DownloadWithRetry -Url $kindDownloadLink -Name "kind.exe" -DownloadPath $destFilePath Start-DownloadWithRetry -Url $kindDownloadLink -Name "kind.exe" -DownloadPath $destFilePath