forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{Package} Migrate CLI packaging system to PEP420 (Azure#14372)
* init pep420 change * fix linter error * fix another linter error * elegant way to handle __main__.py * remove nspkg * refactor azure_bdist_wheel to fit wheel 0.34.2 * add namespace package __init__.py to sdist * fix merge conflict * fix generic update problem * fix merge conflict * upgrade telemetry version * upgrade telemetry version * rollback some useless change * build yum/deb/homebrew etx * use template to generate formula * update build.cmd * update build scripts * upgrade azure-mutliapi-storage to 0.3.6 * fix debian build script * fix merge conflict * init pep420 change * fix linter error * fix another linter error * elegant way to handle __main__.py * remove nspkg * refactor azure_bdist_wheel to fit wheel 0.34.2 * add namespace package __init__.py to sdist * fix merge conflict * fix generic update problem * fix merge conflict * upgrade telemetry version * upgrade telemetry version * rollback some useless change * build yum/deb/homebrew etx * use template to generate formula * update build.cmd * update build scripts * upgrade azure-mutliapi-storage to 0.3.6 * fix debian build script * fix merge conflict * fix merge conflict * fix generic update test problem * remove extra __init__.py * remove __init__.pyc file in debian and rpm * update build wheel stratages * update version * update build scripts * fix webapp test error * add __main__.py in sdist * add test homebrew package scripts * update version value in __main__.py * make test_homebrew_package.sh executable * fix homebrew permission problem * fix error * skip some acr tests * fix style error * skip config tests * fix config test MAC error * fix role config test error * fix test error * fix test error * workaround for vsts bug * fix test error * fix homebrew test error * fix configure test error * update homebrew package job timeout value * use released azdev * rollback pipelines * rollback pipelines 2 * refactor config test
- Loading branch information
Showing
69 changed files
with
208 additions
and
578 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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Extract the version of the CLI from azure-cli package's __init__.py file. | ||
# Extract the version of the CLI from azure-cli package's __main__.py file. | ||
|
||
: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}" | ||
|
||
ver=`cat src/azure-cli/azure/cli/__init__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g` | ||
ver=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g` | ||
echo $ver > $BUILD_STAGINGDIRECTORY/version | ||
echo $ver > $BUILD_STAGINGDIRECTORY/azure-cli-${ver}.txt |
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 |
---|---|---|
|
@@ -6,13 +6,20 @@ class AzureCli < Formula | |
url "{{ upstream_url }}" | ||
version "{{ cli_version }}" | ||
sha256 "{{ upstream_sha }}" | ||
license "MIT" | ||
head "https://github.com/Azure/azure-cli.git" | ||
|
||
{{ bottle_hash }} | ||
|
||
depends_on "[email protected]" | ||
depends_on "[email protected]" | ||
|
||
uses_from_macos "libffi" | ||
|
||
on_linux do | ||
depends_on "pkg-config" => :build | ||
end | ||
|
||
{{ resources }} | ||
|
||
def install | ||
|
@@ -28,8 +35,6 @@ class AzureCli < Formula | |
buildpath/"src/azure-cli", | ||
buildpath/"src/azure-cli-telemetry", | ||
buildpath/"src/azure-cli-core", | ||
buildpath/"src/azure-cli-nspkg", | ||
buildpath/"src/azure-cli-command_modules-nspkg", | ||
] | ||
|
||
# Install CLI | ||
|
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,34 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
import os | ||
import sys | ||
import subprocess | ||
|
||
if len(sys.argv) < 2: | ||
print('AZ_BASE or PYTHON_VERSION are not specified') | ||
sys.exit(-1) | ||
|
||
az_base = sys.argv[1] | ||
python_version = sys.argv[2] | ||
|
||
root_dir = '{}/lib/{}/site-packages/azure/cli/command_modules'.format(az_base, python_version) | ||
mod_list = [mod for mod in sorted(os.listdir(root_dir)) if os.path.isdir(os.path.join(root_dir, mod)) and mod != '__pycache__'] | ||
|
||
pytest_base_cmd = 'PYTHONPATH={}/lib/{}/site-packages python -m pytest -x -v --boxed -p no:warnings --log-level=WARN'.format(az_base, python_version) | ||
pytest_parallel_cmd = '{} -n auto'.format(pytest_base_cmd) | ||
|
||
for mod_name in mod_list: | ||
if mod_name in ['botservice', 'network', 'configure']: | ||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/{}.xml --pyargs azure.cli.command_modules.{}'.format(pytest_base_cmd, mod_name, mod_name)], shell=True) | ||
else: | ||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/{}.xml --pyargs azure.cli.command_modules.{}'.format(pytest_parallel_cmd, mod_name, mod_name)], shell=True) | ||
if exit_code == 5: | ||
print('No tests found for {}'.format(mod_name)) | ||
elif exit_code != 0: | ||
sys.exit(exit_code) | ||
|
||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/azure-cli-core.xml --pyargs azure.cli.core'.format(pytest_base_cmd)], shell=True) | ||
sys.exit(exit_code) |
Oops, something went wrong.