azure-cli.extensions-tool: commit removals last

These are most likely to require human intervention, having them last simplifies rebase.

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2024-11-02 10:39:21 +01:00
parent d4f265a2ed
commit cfc3ac4d4e

View File

@ -288,15 +288,6 @@ def main() -> None:
for prev, new in updated:
logger.info(f" {prev.pname} {prev.version} -> {new.version}")
for ext in removed:
extensions_local.remove(ext)
# TODO: Add additional check why this is removed
# TODO: Add an alias to extensions manual?
commit_msg = f"azure-cli-extensions.{ext.pname}: remove"
_write_extension_set(extension_file, extensions_local)
if args.commit:
_commit(repo, commit_msg, [extension_file])
for ext in init:
extensions_local.add(ext)
commit_msg = f"azure-cli-extensions.{ext.pname}: init at {ext.version}"
@ -314,6 +305,15 @@ def main() -> None:
if args.commit:
_commit(repo, commit_msg, [extension_file])
for ext in removed:
extensions_local.remove(ext)
# TODO: Add additional check why this is removed
# TODO: Add an alias to extensions manual?
commit_msg = f"azure-cli-extensions.{ext.pname}: remove"
_write_extension_set(extension_file, extensions_local)
if args.commit:
_commit(repo, commit_msg, [extension_file])
if __name__ == "__main__":
main()