diff --git a/README.md b/README.md index c32f52c..b92a3c7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Microsoft Azure CLI Extension for creating (or _"baking"_) custom virtual machin To install the Azure CLI Custom Image Helper extension, simply run the following command: ```sh -az extension add --source https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-0.3.6-py3-none-any.whl -y +az extension add --source https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-0.3.7-py3-none-any.whl -y ``` ### Update diff --git a/bake/HISTORY.rst b/bake/HISTORY.rst index a43c93a..82d328c 100644 --- a/bake/HISTORY.rst +++ b/bake/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.3.7 +++++++ +* Always use latest version of az bake in Azure DevOps pipelines + 0.3.6 ++++++ * Added az bake image bump @@ -12,7 +16,7 @@ Release History 0.3.5 ++++++ * Added az bake image bump -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.3.4 ++++++ @@ -28,7 +32,7 @@ Release History 0.3.1 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.3.0 ++++++ @@ -36,15 +40,15 @@ Release History 0.2.9 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.2.8 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.2.7 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.2.6 ++++++ @@ -56,11 +60,11 @@ Release History 0.2.4 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.2.3 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.2.2 ++++++ @@ -76,7 +80,7 @@ Release History 0.1.19 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.18 ++++++ @@ -84,7 +88,7 @@ Release History 0.1.17 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.16 ++++++ @@ -92,15 +96,15 @@ Release History 0.1.15 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.14 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.13 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.12 ++++++ @@ -118,7 +122,7 @@ Release History 0.1.9 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.8 ++++++ @@ -126,11 +130,11 @@ Release History 0.1.7 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.6 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.1.5 ++++++ @@ -157,15 +161,15 @@ Release History 0.1.0 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.35 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.34 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.33 ++++++ @@ -242,63 +246,63 @@ Release History 0.0.16 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.15 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.14 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.13 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.12 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.11 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.10 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.9 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.8 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.7 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.6 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.5 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.4 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.3 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.2 ++++++ -* Bug fixes and minor improvements. +* Bug fixes and minor improvements 0.0.1 ++++++ diff --git a/bake/azext_bake/_constants.py b/bake/azext_bake/_constants.py index f1b469a..dba52e4 100644 --- a/bake/azext_bake/_constants.py +++ b/bake/azext_bake/_constants.py @@ -283,12 +283,11 @@ def tag_key(key): AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET) AZURE_TENANT_ID: $(AZURE_TENANT_ID) - - script: az extension add --source https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-0.3.6-py3-none-any.whl -y + - script: | # get the latest version of az bake from the github releases and install it + curl -L https://github.com/colbylwilliams/az-bake/releases/latest/download/index.json > $AGENT_TEMPDIRECTORY/index.json + az extension add --yes --source $(jq -r '.extensions.bake[0].downloadUrl' $AGENT_TEMPDIRECTORY/index.json) displayName: Install az bake - - script: az bake upgrade - displayName: Update az bake - - script: az bake repo build --verbose --repo . displayName: Run az bake env: diff --git a/bake/setup.py b/bake/setup.py index 89c25ef..f6eab41 100644 --- a/bake/setup.py +++ b/bake/setup.py @@ -17,7 +17,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") # Must match a HISTORY.rst entry. -VERSION = '0.3.6' +VERSION = '0.3.7' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/builder/Dockerfile b/builder/Dockerfile index f4948f9..6f283a1 100644 --- a/builder/Dockerfile +++ b/builder/Dockerfile @@ -38,7 +38,7 @@ LABEL maintainer="Microsoft" \ RUN apk add --no-cache packer --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community # install az-bake -RUN az extension add --source https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-0.3.6-py3-none-any.whl -y +RUN az extension add --source https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-0.3.7-py3-none-any.whl -y # Terminate container on stop STOPSIGNAL SIGTERM diff --git a/tools/bump-version.py b/tools/bump-version.py index 63778f5..729499b 100644 --- a/tools/bump-version.py +++ b/tools/bump-version.py @@ -8,12 +8,12 @@ from pathlib import Path from re import search -from packaging.version import parse # pylint: disable=unresolved-import +from packaging.version import parse as parse_version # pylint: disable=unresolved-import parser = argparse.ArgumentParser() parser.add_argument('--major', action='store_true', help='bump major version') parser.add_argument('--minor', action='store_true', help='bump minor version') -parser.add_argument('--notes', nargs='*', default=['Bug fixes and minor improvements.'], help='space seperated strings with release notes') +parser.add_argument('--notes', nargs='*', default=['Bug fixes and minor improvements'], help='space seperated strings with release notes') args = parser.parse_args() @@ -43,21 +43,21 @@ if not version: raise ValueError('no version found in setup.py') -version_old = parse(version) +version_old = parse_version(version) n_major = version_old.major + 1 if major else version_old.major n_minor = 0 if major else version_old.minor + 1 if minor else version_old.minor n_patch = 0 if major or minor else version_old.micro + 1 -version_new = parse('{}.{}.{}'.format(n_major, n_minor, n_patch)) +version_new = parse_version(f'{n_major}.{n_minor}.{n_patch}') -print('bumping version: {} -> {}'.format(version_old.public, version_new.public)) +print(f'bumping version: {version_old.public} -> {version_new.public}') fmt_setup = 'VERSION = \'{}\'' fmt_readme = 'https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-{}-py3-none-any.whl' fmt_docker = 'https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-{}-py3-none-any.whl' -fmt_consts = 'https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-{}-py3-none-any.whl' +# fmt_consts = 'https://github.com/colbylwilliams/az-bake/releases/latest/download/bake-{}-py3-none-any.whl' fmt_history = '{}\n++++++\n{}\n\n{}' @@ -117,15 +117,15 @@ f.write(readme) -print('..updating _constants.py') +# print('..updating _constants.py') -with open(path_bake / 'azext_bake' / '_constants.py', 'r') as f: - constants = f.read() +# with open(path_bake / 'azext_bake' / '_constants.py', 'r') as f: +# constants = f.read() -if fmt_consts.format(version_old.public) not in constants: - raise ValueError('version string not found in _constants.py') +# if fmt_consts.format(version_old.public) not in constants: +# raise ValueError('version string not found in _constants.py') -constants = constants.replace(fmt_consts.format(version_old.public), fmt_consts.format(version_new.public)) +# constants = constants.replace(fmt_consts.format(version_old.public), fmt_consts.format(version_new.public)) -with open(path_bake / 'azext_bake' / '_constants.py', 'w') as f: - f.write(constants) +# with open(path_bake / 'azext_bake' / '_constants.py', 'w') as f: +# f.write(constants)