Azure / azure-cli-dev-tools

Developer utilities for Azure CLI command module and extension developers.
MIT License
81 stars 113 forks source link

add extension show #456

Closed AllyW closed 4 months ago

AllyW commented 5 months ago

azdev extension show --mod-name network-manager { "name": "network-manager", "path": "XXXXXXXX\azure-cli-extensions\src\network-manager", "pkg_name": "virtual-network-manager", "pkg_version": "1.2.0" } refer to this issue: https://github.com/Azure/azure-cli-dev-tools/issues/453

azure-client-tools-bot-prd[bot] commented 5 months ago

Hi @AllyW, Please write the description of change into HISTORY.rst. If you want to release a new azdev version, please update the VERSION in init.py as well.

wangzelin007 commented 5 months ago
  1. Please fix the CI errors
  2. Where is this command used?
  3. It is hard to understanding what pkg name search error is from please refer to https://github.com/Azure/azure-cli-extensions/pull/7670, can you describe it in detail?
AllyW commented 5 months ago
  1. Please fix the CI errors
  2. Where is this command used?
  3. It is hard to understanding what pkg name search error is from please refer to https://github.com/Azure/azure-cli-extensions/pull/7670, can you describe it in detail?

There is a feature needed in versioning calculation process that maps extension module name to its package name in index.json, because bot needs to know the current latest version of corresponding extension module from index.json, to deduce the next version.

And most of the time, extension module name is equivalent to its package name, but in minor cases, they are different, like extension module "network-manager" and its package name "virtual-network-manager". For these kind of extension modules, versioning bot needs its package name to extract its historical version number correctly from index.json. That's what this function is intended for.

And I found azdev extension has add, remove, list, but no show and this function can somehow work as showing extension module detail, so just wrapped this function into azdev extension show cmd in case needed and for easy usage.