2020-04-13 17:38:35 +03:00
|
|
|
################################################################################
|
|
|
|
|
## File: Install-AliyunCli.ps1
|
|
|
|
|
## Desc: Install Alibaba Cloud CLI
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2020-08-05 14:07:44 +03:00
|
|
|
Write-Host "Download Latest aliyun-cli archive"
|
2022-03-23 21:34:40 +01:00
|
|
|
$ZipballUrl = 'https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip'
|
|
|
|
|
$aliyunArchivePath = Start-DownloadWithRetry -Url $ZipballUrl -Name "aliyun-cli.zip"
|
2020-08-05 14:07:44 +03:00
|
|
|
|
|
|
|
|
Write-Host "Expand aliyun-cli archive"
|
|
|
|
|
$aliyunPath = "C:\aliyun-cli"
|
|
|
|
|
New-Item -Path $aliyunPath -ItemType Directory -Force
|
|
|
|
|
Extract-7Zip -Path $aliyunArchivePath -DestinationPath $aliyunPath
|
|
|
|
|
|
|
|
|
|
# Add aliyun-cli to path
|
|
|
|
|
Add-MachinePathItem $aliyunPath
|
2020-07-21 09:50:01 +03:00
|
|
|
|
2020-08-06 11:27:58 +03:00
|
|
|
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Aliyun CLI"
|