From a1a5b83fe8cb8d0c689d7864dd6a300d797f9aa3 Mon Sep 17 00:00:00 2001 From: Ernest Wong Date: Wed, 25 Apr 2018 12:37:12 -0700 Subject: [PATCH 1/3] Fix alias default export path --- src/alias/azext_alias/_help.py | 4 +++- src/alias/azext_alias/custom.py | 5 ++++- src/alias/azext_alias/version.py | 2 +- src/index.json | 8 ++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/alias/azext_alias/_help.py b/src/alias/azext_alias/_help.py index d4b2cbe0b3d..0e02e7f3ca5 100644 --- a/src/alias/azext_alias/_help.py +++ b/src/alias/azext_alias/_help.py @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + from knack.help_files import helps # pylint: disable=unused-import @@ -41,7 +43,7 @@ helps['alias export'] = """ type: command - short-summary: Export all registered aliases to a given path, as an INI configuration file. + short-summary: Export all registered aliases to a given path, as an INI configuration file. If no export path is specified, the alias configuration file is export to the current working directory. """ diff --git a/src/alias/azext_alias/custom.py b/src/alias/azext_alias/custom.py index 83fd47b9937..15124fc5360 100644 --- a/src/alias/azext_alias/custom.py +++ b/src/alias/azext_alias/custom.py @@ -39,7 +39,7 @@ def create_alias(alias_name, alias_command): _commit_change(alias_table) -def export_aliases(export_path=os.path.abspath(ALIAS_FILE_NAME), exclusions=None): +def export_aliases(export_path=None, exclusions=None): """ Export all registered aliases to a given path, as an INI configuration file. @@ -47,6 +47,9 @@ def export_aliases(export_path=os.path.abspath(ALIAS_FILE_NAME), exclusions=None export_path: The path of the alias configuration file to export to. exclusions: Space-separated aliases excluded from export. """ + if not export_path: + export_path = os.path.abspath(ALIAS_FILE_NAME) + alias_table = get_alias_table() for exclusion in exclusions or []: if exclusion not in alias_table.sections(): diff --git a/src/alias/azext_alias/version.py b/src/alias/azext_alias/version.py index 0e6de423b13..9bf03ff7bca 100644 --- a/src/alias/azext_alias/version.py +++ b/src/alias/azext_alias/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = '0.5.0' +VERSION = '0.5.1' diff --git a/src/index.json b/src/index.json index abc99218f4b..9ff36fee263 100644 --- a/src/index.json +++ b/src/index.json @@ -463,9 +463,9 @@ ], "alias": [ { - "filename": "alias-0.5.0-py2.py3-none-any.whl", - "sha256Digest": "f50723edb97a4f67535e0832d843abebf8272152efc4ec8201a48307999aa59c", - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/alias-0.5.0-py2.py3-none-any.whl", + "filename": "alias-0.5.1-py2.py3-none-any.whl", + "sha256Digest": "d57433d60b3269334d128d6f3091458cbf9cf529a019b1cda2b0fb4f8a908cd1", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/alias-0.5.1-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.31.dev0", @@ -512,7 +512,7 @@ } ], "summary": "Support for command aliases", - "version": "0.5.0" + "version": "0.5.1" } } ], From bcd888a7886ad64eb35be7ad3e13dd81bb71e47b Mon Sep 17 00:00:00 2001 From: Ernest Wong Date: Wed, 25 Apr 2018 12:42:17 -0700 Subject: [PATCH 2/3] Fix typo --- src/alias/azext_alias/_help.py | 2 +- src/index.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alias/azext_alias/_help.py b/src/alias/azext_alias/_help.py index 0e02e7f3ca5..c8f717b968e 100644 --- a/src/alias/azext_alias/_help.py +++ b/src/alias/azext_alias/_help.py @@ -43,7 +43,7 @@ helps['alias export'] = """ type: command - short-summary: Export all registered aliases to a given path, as an INI configuration file. If no export path is specified, the alias configuration file is export to the current working directory. + short-summary: Export all registered aliases to a given path, as an INI configuration file. If no export path is specified, the alias configuration file is exported to the current working directory. """ diff --git a/src/index.json b/src/index.json index 9ff36fee263..1814ee8ed12 100644 --- a/src/index.json +++ b/src/index.json @@ -464,7 +464,7 @@ "alias": [ { "filename": "alias-0.5.1-py2.py3-none-any.whl", - "sha256Digest": "d57433d60b3269334d128d6f3091458cbf9cf529a019b1cda2b0fb4f8a908cd1", + "sha256Digest": "81b9a7f1824bffcbd6e72680891476151dde868e030cdbf1bfd9135e1a8f3447", "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/alias-0.5.1-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, From 8e0b299968ffeb71dd9c23a99ab06c4bf917987c Mon Sep 17 00:00:00 2001 From: Ernest Wong Date: Wed, 25 Apr 2018 12:53:49 -0700 Subject: [PATCH 3/3] Fix CI --- src/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.json b/src/index.json index 1814ee8ed12..be646b41ff1 100644 --- a/src/index.json +++ b/src/index.json @@ -500,7 +500,7 @@ } }, "extras": [], - "generator": "bdist_wheel (0.29.0)", + "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", "name": "alias",