azdev 0.1.68__tar.gz → 0.1.71__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azdev-0.1.68 → azdev-0.1.71}/HISTORY.rst +13 -0
- {azdev-0.1.68/azdev.egg-info → azdev-0.1.71}/PKG-INFO +14 -1
- {azdev-0.1.68 → azdev-0.1.71}/azdev/__init__.py +1 -1
- {azdev-0.1.68 → azdev-0.1.71}/azdev/commands.py +1 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/help.py +10 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/cmdcov.py +0 -57
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/extensions/__init__.py +30 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/extensions/util.py +13 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/extensions/version_upgrade.py +12 -2
- {azdev-0.1.68 → azdev-0.1.71}/azdev/params.py +3 -0
- {azdev-0.1.68 → azdev-0.1.71/azdev.egg-info}/PKG-INFO +14 -1
- {azdev-0.1.68 → azdev-0.1.71}/LICENSE +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/MANIFEST.in +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/README.md +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/README.rst +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/__main__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/completer.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/config/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/component.js +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/command_change/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/command_change/custom.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/command_change/util.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/constant.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/legal.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/performance.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/regex.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/resource.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/setup.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/statistics/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/style.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/testtool/profile_context.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/operations/testtool/pytest_runner.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/transformers.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/__init__.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/command.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/config.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/const.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/display.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/path.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev.egg-info/SOURCES.txt +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev.egg-info/requires.txt +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/pyproject.toml +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/setup.cfg +0 -0
- {azdev-0.1.68 → azdev-0.1.71}/setup.py +0 -0
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.71
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev extension show`: Show detailed extension info that installed in your development environment.
|
|
8
|
+
* `azdev extension cal-next-version`: Fix last stable version parser from index.json.
|
|
9
|
+
|
|
10
|
+
0.1.70
|
|
11
|
+
++++++
|
|
12
|
+
* Fix cmdcov issue(#455): remove tested_command.txt reference.
|
|
13
|
+
|
|
14
|
+
0.1.69
|
|
15
|
+
++++++
|
|
16
|
+
* `azdev command-change tree-export`: Add command help message.
|
|
17
|
+
|
|
5
18
|
0.1.68
|
|
6
19
|
++++++
|
|
7
20
|
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.71
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -145,6 +145,19 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.71
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev extension show`: Show detailed extension info that installed in your development environment.
|
|
151
|
+
* `azdev extension cal-next-version`: Fix last stable version parser from index.json.
|
|
152
|
+
|
|
153
|
+
0.1.70
|
|
154
|
+
++++++
|
|
155
|
+
* Fix cmdcov issue(#455): remove tested_command.txt reference.
|
|
156
|
+
|
|
157
|
+
0.1.69
|
|
158
|
+
++++++
|
|
159
|
+
* `azdev command-change tree-export`: Add command help message.
|
|
160
|
+
|
|
148
161
|
0.1.68
|
|
149
162
|
++++++
|
|
150
163
|
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
@@ -67,6 +67,7 @@ def load_command_table(self, _):
|
|
|
67
67
|
g.command('publish', 'publish_extensions')
|
|
68
68
|
g.command('update-index', 'update_extension_index')
|
|
69
69
|
g.command('cal-next-version', 'cal_next_version')
|
|
70
|
+
g.command('show', 'show_extension')
|
|
70
71
|
|
|
71
72
|
with CommandGroup(self, 'extension repo', operation_group('extensions')) as g:
|
|
72
73
|
g.command('add', 'add_extension_repo')
|
|
@@ -197,6 +197,13 @@ helps['command-change meta-diff'] = """
|
|
|
197
197
|
text: azdev statistics meta-diff --base-meta-file fileA --diff-meta-file fileB --only-break
|
|
198
198
|
"""
|
|
199
199
|
|
|
200
|
+
helps['command-change tree-export'] = """
|
|
201
|
+
short-summary: Export Command Tree for CLI modules or extensions.
|
|
202
|
+
examples:
|
|
203
|
+
- name: Export command tree for CLI modules
|
|
204
|
+
text: azdev command-change tree-export CLI --output-file command_tree.json
|
|
205
|
+
"""
|
|
206
|
+
|
|
200
207
|
helps['perf'] = """
|
|
201
208
|
short-summary: Commands to test CLI performance.
|
|
202
209
|
"""
|
|
@@ -251,6 +258,9 @@ helps['extension list'] = """
|
|
|
251
258
|
short-summary: List what extensions are currently visible to your development environment.
|
|
252
259
|
"""
|
|
253
260
|
|
|
261
|
+
helps['extension show'] = """
|
|
262
|
+
short-summary: Show detailed extension info that installed in your development environment.
|
|
263
|
+
"""
|
|
254
264
|
|
|
255
265
|
helps['extension publish'] = """
|
|
256
266
|
short-summary: Build and publish an extension to a storage account.
|
|
@@ -58,7 +58,6 @@ class CmdcovManager:
|
|
|
58
58
|
self.enable_cli_own = enable_cli_own
|
|
59
59
|
self.all_commands = {m: [] for m in self.selected_mod_names}
|
|
60
60
|
self.all_tested_commands = {m: [] for m in self.selected_mod_names}
|
|
61
|
-
self.all_live_commands = []
|
|
62
61
|
self.all_untested_commands = {}
|
|
63
62
|
self.command_test_coverage = {'Total': [0, 0, 0]}
|
|
64
63
|
self.date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
|
@@ -73,8 +72,6 @@ class CmdcovManager:
|
|
|
73
72
|
self._get_all_tested_commands_from_regex()
|
|
74
73
|
self._get_all_tested_commands_from_record()
|
|
75
74
|
self._run_command_test_coverage()
|
|
76
|
-
self._get_all_tested_commands_from_live()
|
|
77
|
-
self._run_command_test_coverage_enhance()
|
|
78
75
|
html_file = self._render_html()
|
|
79
76
|
if self.enable_cli_own:
|
|
80
77
|
command_test_coverage = {k: v for k, v in self.command_test_coverage.items() if k in CLI_OWN_MODULES}
|
|
@@ -191,10 +188,6 @@ class CmdcovManager:
|
|
|
191
188
|
cmd = command + ' ' + argument
|
|
192
189
|
self.all_tested_commands[self.selected_mod_names[idx]].append(cmd)
|
|
193
190
|
|
|
194
|
-
def _get_all_tested_commands_from_live(self):
|
|
195
|
-
with open(os.path.join(self.cmdcov_path, 'tested_command.txt'), 'r') as f:
|
|
196
|
-
self.all_live_commands = f.readlines()
|
|
197
|
-
|
|
198
191
|
def _run_command_test_coverage(self):
|
|
199
192
|
"""
|
|
200
193
|
all_commands: All commands that need to be test
|
|
@@ -247,56 +240,6 @@ class CmdcovManager:
|
|
|
247
240
|
logger.warning(self.command_test_coverage)
|
|
248
241
|
return self.command_test_coverage
|
|
249
242
|
|
|
250
|
-
def _run_command_test_coverage_enhance(self):
|
|
251
|
-
"""
|
|
252
|
-
all_untest_commands: {[module]:[],}
|
|
253
|
-
all_tested_commands_from_file: []
|
|
254
|
-
command_test_coverage: {[module: [test, untested, pct]
|
|
255
|
-
module: vm
|
|
256
|
-
percentage: xx.xxx%
|
|
257
|
-
"""
|
|
258
|
-
import ast
|
|
259
|
-
total_tested = 0
|
|
260
|
-
total_untested = 0
|
|
261
|
-
# pylint: disable=too-many-nested-blocks
|
|
262
|
-
for module, untested_commands in self.all_untested_commands.items():
|
|
263
|
-
for cmd_idx, command in enumerate(untested_commands):
|
|
264
|
-
exist_flag = False
|
|
265
|
-
prefix = command.rsplit('[', maxsplit=1)[0]
|
|
266
|
-
opt_list = ast.literal_eval('[' + command.rsplit('[', maxsplit=1)[1]) if self.level == 'argument' \
|
|
267
|
-
else []
|
|
268
|
-
for cmd in self.all_live_commands:
|
|
269
|
-
if prefix in cmd:
|
|
270
|
-
if self.level == 'argument':
|
|
271
|
-
for opt in opt_list:
|
|
272
|
-
if opt in cmd:
|
|
273
|
-
self.command_test_coverage[module][0] += 1
|
|
274
|
-
untested_commands.pop(cmd_idx)
|
|
275
|
-
exist_flag = True
|
|
276
|
-
if exist_flag:
|
|
277
|
-
break
|
|
278
|
-
else:
|
|
279
|
-
self.command_test_coverage[module][0] += 1
|
|
280
|
-
untested_commands.pop(cmd_idx)
|
|
281
|
-
exist_flag = True
|
|
282
|
-
if exist_flag:
|
|
283
|
-
break
|
|
284
|
-
if exist_flag:
|
|
285
|
-
break
|
|
286
|
-
try:
|
|
287
|
-
self.command_test_coverage[module][1] = len(untested_commands)
|
|
288
|
-
self.command_test_coverage[module][2] = f'''{self.command_test_coverage[module][0] /
|
|
289
|
-
(self.command_test_coverage[module][0] +
|
|
290
|
-
self.command_test_coverage[module][1]):.3%}'''
|
|
291
|
-
except ZeroDivisionError:
|
|
292
|
-
self.command_test_coverage[module] = [0, 0, 'N/A']
|
|
293
|
-
total_tested += self.command_test_coverage[module][0] if self.command_test_coverage[module] else 0
|
|
294
|
-
total_untested += self.command_test_coverage[module][1] if self.command_test_coverage[module] else 0
|
|
295
|
-
self.command_test_coverage['Total'][0] = total_tested
|
|
296
|
-
self.command_test_coverage['Total'][1] = total_untested
|
|
297
|
-
self.command_test_coverage['Total'][2] = f'{total_tested / (total_tested + total_untested):.3%}'
|
|
298
|
-
logger.warning(self.command_test_coverage)
|
|
299
|
-
|
|
300
243
|
def _render_html(self):
|
|
301
244
|
"""
|
|
302
245
|
:return: Return a HTML string
|
|
@@ -138,6 +138,36 @@ def list_extensions():
|
|
|
138
138
|
return results
|
|
139
139
|
|
|
140
140
|
|
|
141
|
+
def show_extension(mod_name):
|
|
142
|
+
ext_paths = get_ext_repo_paths()
|
|
143
|
+
ext_mod_paths = [os.path.join(ext, "src", mod_name) for ext in ext_paths]
|
|
144
|
+
mod_install_path = find_files(ext_mod_paths, '*.*-info')
|
|
145
|
+
|
|
146
|
+
if not mod_install_path:
|
|
147
|
+
raise CLIError('extension not installed using azdev: {}'.format(mod_name))
|
|
148
|
+
|
|
149
|
+
if len(mod_install_path) > 1:
|
|
150
|
+
raise CLIError('extension {} duplicated, please specify extension name'.format(mod_name))
|
|
151
|
+
|
|
152
|
+
mod_install_dir = os.path.dirname(mod_install_path[0])
|
|
153
|
+
long_name = os.path.basename(mod_install_dir)
|
|
154
|
+
assert long_name == mod_name
|
|
155
|
+
mod_info = {
|
|
156
|
+
"name": mod_name,
|
|
157
|
+
"path": mod_install_dir
|
|
158
|
+
}
|
|
159
|
+
# extract pkg name from egg-info or dist-info folders
|
|
160
|
+
logger.debug("Extracting pkg info from %s...", mod_install_path[0])
|
|
161
|
+
meta_files = ["PKG-INFO", "METADATA"]
|
|
162
|
+
pkg_info_path = [os.path.join(mod_install_path[0], meta) for meta in meta_files
|
|
163
|
+
if os.path.isfile(os.path.join(mod_install_path[0], meta))]
|
|
164
|
+
from .util import get_pkg_info_from_pkg_metafile
|
|
165
|
+
for pkg_info_file in pkg_info_path:
|
|
166
|
+
pkg_info = get_pkg_info_from_pkg_metafile(pkg_info_file)
|
|
167
|
+
mod_info.update(pkg_info)
|
|
168
|
+
return mod_info
|
|
169
|
+
|
|
170
|
+
|
|
141
171
|
def _get_sha256sum(a_file):
|
|
142
172
|
import hashlib
|
|
143
173
|
sha256 = hashlib.sha256()
|
|
@@ -81,3 +81,16 @@ def get_whl_from_url(url, filename, tmp_dir, whl_cache=None):
|
|
|
81
81
|
f.write(chunk)
|
|
82
82
|
whl_cache[url] = ext_file
|
|
83
83
|
return ext_file
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def get_pkg_info_from_pkg_metafile(pkg_info_file):
|
|
87
|
+
mod_info = {}
|
|
88
|
+
with open(pkg_info_file, "r", encoding="utf-8") as f:
|
|
89
|
+
for line in f:
|
|
90
|
+
if line.startswith("Name:"):
|
|
91
|
+
pkg_name = line.split(":")[-1].strip()
|
|
92
|
+
mod_info["pkg_name"] = pkg_name
|
|
93
|
+
if line.startswith("Version:"):
|
|
94
|
+
pkg_version = line.split(":")[-1].strip()
|
|
95
|
+
mod_info["pkg_version"] = pkg_version
|
|
96
|
+
return mod_info
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md
|
|
10
10
|
|
|
11
11
|
from packaging.version import parse
|
|
12
|
+
from knack.util import CLIError
|
|
12
13
|
from azure_cli_diff_tool.utils import DiffLevel
|
|
13
14
|
from azdev.operations.constant import (PREVIEW_INIT_SUFFIX, VERSION_MAJOR_TAG, VERSION_MINOR_TAG,
|
|
14
15
|
VERSION_PATCH_TAG, VERSION_STABLE_TAG, VERSION_PREVIEW_TAG, VERSION_PRE_TAG,
|
|
@@ -70,6 +71,8 @@ class VersionUpgradeMod:
|
|
|
70
71
|
self.init_version_pre_tag()
|
|
71
72
|
self.next_version = ModuleVersion(self.version)
|
|
72
73
|
self.last_stable_major = float('inf')
|
|
74
|
+
self.pkg_name = self.module_name
|
|
75
|
+
self.parse_pkg_name()
|
|
73
76
|
self.parse_last_stable_major()
|
|
74
77
|
|
|
75
78
|
def norm_versions(self):
|
|
@@ -179,15 +182,22 @@ class VersionUpgradeMod:
|
|
|
179
182
|
has_stable = True
|
|
180
183
|
return has_stable, max_stable_major
|
|
181
184
|
|
|
185
|
+
def parse_pkg_name(self):
|
|
186
|
+
from azdev.operations.extensions import show_extension
|
|
187
|
+
try:
|
|
188
|
+
self.pkg_name = show_extension(self.module_name)["pkg_name"]
|
|
189
|
+
except CLIError:
|
|
190
|
+
pass
|
|
191
|
+
|
|
182
192
|
def parse_last_stable_major(self):
|
|
183
193
|
import requests
|
|
184
194
|
try:
|
|
185
195
|
response = requests.get(CLI_EXTENSION_INDEX_URL)
|
|
186
196
|
extension_data = response.json()
|
|
187
|
-
if self.
|
|
197
|
+
if self.pkg_name not in extension_data["extensions"]:
|
|
188
198
|
return
|
|
189
199
|
has_stable, max_stable_major = self.find_max_version(
|
|
190
|
-
extension_data["extensions"][self.
|
|
200
|
+
extension_data["extensions"][self.pkg_name])
|
|
191
201
|
if has_stable:
|
|
192
202
|
self.last_stable_major = max_stable_major
|
|
193
203
|
else:
|
|
@@ -178,6 +178,9 @@ def load_arguments(self, _):
|
|
|
178
178
|
c.argument('next_version_pre_tag', help='next version is stable or preview, if not provided, use current stable/preview tag')
|
|
179
179
|
c.argument('next_version_segment_tag', help='used to modify actual major/minor/patch/pre, if provided, increment version as provided')
|
|
180
180
|
|
|
181
|
+
with ArgumentsContext(self, 'extension show') as c:
|
|
182
|
+
c.argument('mod_name', required=True, help='installed extension module name')
|
|
183
|
+
|
|
181
184
|
with ArgumentsContext(self, 'cli create') as c:
|
|
182
185
|
c.positional('mod_name', help='Name of the module to create.')
|
|
183
186
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.71
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -145,6 +145,19 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.71
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev extension show`: Show detailed extension info that installed in your development environment.
|
|
151
|
+
* `azdev extension cal-next-version`: Fix last stable version parser from index.json.
|
|
152
|
+
|
|
153
|
+
0.1.70
|
|
154
|
+
++++++
|
|
155
|
+
* Fix cmdcov issue(#455): remove tested_command.txt reference.
|
|
156
|
+
|
|
157
|
+
0.1.69
|
|
158
|
+
++++++
|
|
159
|
+
* `azdev command-change tree-export`: Add command help message.
|
|
160
|
+
|
|
148
161
|
0.1.68
|
|
149
162
|
++++++
|
|
150
163
|
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|