vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1

19 lines
597 B
PowerShell
Raw Normal View History

2024-07-16 14:18:52 +08:00
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
param([string]$SasToken)
if (Test-Path "$PSScriptRoot/utility-prefix.ps1") {
. "$PSScriptRoot/utility-prefix.ps1"
}
[string]$AzCliUrl
if ([string]::IsNullOrEmpty($SasToken)) {
$AzCliUrl = 'https://azcliprod.blob.core.windows.net/msi/azure-cli-2.65.0-x64.msi'
2024-07-16 14:18:52 +08:00
} else {
$SasToken = $SasToken.Replace('"', '')
$AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.65.0-x64.msi?$SasToken"
2024-07-16 14:18:52 +08:00
}
DownloadAndInstall -Url $AzCliUrl -Name 'Azure CLI' -Args @('/quiet', '/norestart')