diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 129f971e78c..9cb24494540 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1094,7 +1094,7 @@ jobs: - bash: | set -ev . env/bin/activate - python scripts/generate_latest_indices.py verify + azdev latest-index verify --repo . displayName: 'Verify generated latest indices' - job: CheckStyle diff --git a/doc/authoring_command_modules/README.md b/doc/authoring_command_modules/README.md index aace2141b84..7362a1d7c14 100644 --- a/doc/authoring_command_modules/README.md +++ b/doc/authoring_command_modules/README.md @@ -163,6 +163,27 @@ Style Checks azdev style [--pylint] [--pep8] ``` +Latest Packaged Indices +----------------------- + +Use azdev wrappers around Azure CLI's latest index generation script: + +``` +azdev latest-index generate +azdev latest-index verify +``` + +You can pass an explicit Azure CLI checkout path when needed: + +``` +azdev latest-index generate --cli /path/to/azure-cli +azdev latest-index verify --cli /path/to/azure-cli +``` + +`azdev latest-index verify` exits non-zero when generated output differs from +the checked-in `commandIndex.latest.json` or `helpIndex.latest.json`, making it +CI-friendly. + Submitting Pull Requests ------------------------ diff --git a/scripts/generate_latest_indices.py b/scripts/generate_latest_indices.py index 927df74fee8..1dde1c5ba29 100644 --- a/scripts/generate_latest_indices.py +++ b/scripts/generate_latest_indices.py @@ -278,7 +278,9 @@ def _run_verify(command_text, help_text): print('Generated latest index files are out of date:') for path in mismatched: print(f' - {path.relative_to(REPO_ROOT)}') - print('Run:') + print('Run either:') + print(' azdev latest-index generate --cli .') + print('or:') print(' python scripts/generate_latest_indices.py generate') return 1