[Windows] use latest version of alyuin-cli from CDN (#5271)

This commit is contained in:
Mikhail Koliada
2022-03-23 21:34:40 +01:00
committed by GitHub
parent 837669d1ac
commit c0e7d2e45d

View File

@@ -4,10 +4,8 @@
################################################################################
Write-Host "Download Latest aliyun-cli archive"
$url = 'https://api.github.com/repos/aliyun/aliyun-cli/releases/latest'
# Explicitly set type to string since match returns array by default
[System.String] $aliyunLatest = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "aliyun-cli-windows"
$aliyunArchivePath = Start-DownloadWithRetry -Url $aliyunLatest -Name "aliyun-cli.zip"
$ZipballUrl = 'https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip'
$aliyunArchivePath = Start-DownloadWithRetry -Url $ZipballUrl -Name "aliyun-cli.zip"
Write-Host "Expand aliyun-cli archive"
$aliyunPath = "C:\aliyun-cli"