aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1')
-rw-r--r--vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps120
1 files changed, 20 insertions, 0 deletions
diff --git a/vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 b/vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1
new file mode 100644
index 0000000..19e5207
--- /dev/null
+++ b/vcpkg/scripts/azure-pipelines/windows/deploy-azure-cli.ps1
@@ -0,0 +1,20 @@
+# 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)) {
+ Write-Host 'Downloading from the Internet'
+ $AzCliUrl = 'https://azcliprod.blob.core.windows.net/msi/azure-cli-2.78.0-x64.msi'
+} else {
+ Write-Host 'Downloading from vcpkgimageminting using SAS token'
+ $SasToken = $SasToken.Replace('"', '')
+ $AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.78.0-x64.msi?$SasToken"
+}
+
+DownloadAndInstall -Url $AzCliUrl -Name 'Azure CLI' -Args @('/quiet', '/norestart')