Skip to content

Commit 8fbf679

Browse files
{CI} Update references for generate/verify commandIdx to use azdev command (#33121)
1 parent 44a0777 commit 8fbf679

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ jobs:
10941094
- bash: |
10951095
set -ev
10961096
. env/bin/activate
1097-
python scripts/generate_latest_indices.py verify
1097+
azdev latest-index verify --repo .
10981098
displayName: 'Verify generated latest indices'
10991099
11001100
- job: CheckStyle

doc/authoring_command_modules/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,27 @@ Style Checks
163163
azdev style <module> [--pylint] [--pep8]
164164
```
165165

166+
Latest Packaged Indices
167+
-----------------------
168+
169+
Use azdev wrappers around Azure CLI's latest index generation script:
170+
171+
```
172+
azdev latest-index generate
173+
azdev latest-index verify
174+
```
175+
176+
You can pass an explicit Azure CLI checkout path when needed:
177+
178+
```
179+
azdev latest-index generate --cli /path/to/azure-cli
180+
azdev latest-index verify --cli /path/to/azure-cli
181+
```
182+
183+
`azdev latest-index verify` exits non-zero when generated output differs from
184+
the checked-in `commandIndex.latest.json` or `helpIndex.latest.json`, making it
185+
CI-friendly.
186+
166187
Submitting Pull Requests
167188
------------------------
168189

scripts/generate_latest_indices.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def _run_verify(command_text, help_text):
278278
print('Generated latest index files are out of date:')
279279
for path in mismatched:
280280
print(f' - {path.relative_to(REPO_ROOT)}')
281-
print('Run:')
281+
print('Run either:')
282+
print(' azdev latest-index generate --cli .')
283+
print('or:')
282284
print(' python scripts/generate_latest_indices.py generate')
283285
return 1
284286

0 commit comments

Comments
 (0)