-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{Packaging} Support Windows ZIP package (#27911)
- Loading branch information
Showing
6 changed files
with
159 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
:: | ||
:: Microsoft Azure CLI - Windows Installer - Author file components script | ||
:: Copyright (C) Microsoft Corporation. All Rights Reserved. | ||
:: | ||
|
||
@IF EXIST "%~dp0\..\python.exe" ( | ||
SET AZ_INSTALLER=ZIP | ||
"%~dp0\..\python.exe" -IBm azure.cli %* | ||
) ELSE ( | ||
echo Failed to load python executable. | ||
exit /b 1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
Set-PSDebug -Trace 1 | ||
|
||
Write-Output "Extracting zip to $env:SYSTEM_ARTIFACTSDIRECTORY\zip\" | ||
& "C:\Program Files\7-Zip\7z.exe" x -o"$env:SYSTEM_ARTIFACTSDIRECTORY\zip\Azure CLI" "$env:SYSTEM_ARTIFACTSDIRECTORY\zip\Microsoft Azure CLI.zip" | ||
|
||
$az_full_path = "$env:SYSTEM_ARTIFACTSDIRECTORY\zip\Azure CLI\bin\az.cmd" | ||
|
||
& $az_full_path --version | ||
|
||
$installed_version=& $az_full_path version --query '\"azure-cli\"' -o tsv | ||
Write-Output "Installed version: $installed_version" | ||
|
||
$artifact_version=Get-Content $env:SYSTEM_ARTIFACTSDIRECTORY\metadata\version | ||
Write-Output "Artifact version: $artifact_version" | ||
|
||
if ($installed_version -ne $artifact_version){ | ||
Write-Output "The installed version doesn't match the artifact version." | ||
Exit 1 | ||
} | ||
|
||
# Test bundled pip with extension installation | ||
& $az_full_path extension add -n account | ||
& $az_full_path self-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters