Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit bddb518

Browse files
authored
Remove regenerate-common.ts sync from sync_from_typespec.py (#3472)
1 parent a6cb76b commit bddb518

1 file changed

Lines changed: 6 additions & 19 deletions

File tree

eng/scripts/sync_from_typespec.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
"""Sync shared files from the typespec repo (http-client-python) into this repo.
99
1010
The typespec repo is the source of truth for:
11-
1. regenerate-common.ts — shared regeneration logic
12-
2. requirements — test dependency files (tests/requirements/)
13-
3. Test files — mock API tests under tests/mock_api/{shared,azure,unbranded}
11+
1. requirements — test dependency files (tests/requirements/)
12+
2. Test files — mock API tests under tests/mock_api/{shared,azure,unbranded}
1413
1514
Usage:
1615
python sync_from_typespec.py <local-typespec-repo-path>
@@ -27,9 +26,6 @@
2726

2827
# --- Path configuration (relative to each repo root) ---
2928

30-
TYPESPEC_COMMON_TS = Path("packages/http-client-python/eng/scripts/ci/regenerate-common.ts")
31-
AUTOREST_COMMON_TS = Path("packages/typespec-python/eng/scripts/regenerate-common.ts")
32-
3329
TYPESPEC_TEST_DIR = Path("packages/http-client-python/tests")
3430
AUTOREST_TEST_DIR = Path("packages/typespec-python/tests")
3531

@@ -279,37 +275,28 @@ def main() -> int:
279275
print(f"ERROR: typespec repo not found: {typespec_repo}", file=sys.stderr)
280276
return 1
281277

282-
# 1. Sync regenerate-common.ts
283-
src_ts = typespec_repo / TYPESPEC_COMMON_TS
284-
dst_ts = autorest_repo / AUTOREST_COMMON_TS
285-
if not src_ts.is_file():
286-
print(f"ERROR: {src_ts} not found", file=sys.stderr)
287-
return 1
288-
shutil.copy2(src_ts, dst_ts)
289-
print(f"Synced regenerate-common.ts")
290-
291-
# 2. Sync requirements files
278+
# 1. Sync requirements files
292279
print("Syncing requirements...")
293280
sync_requirements(
294281
typespec_repo / TYPESPEC_TEST_DIR / "requirements",
295282
autorest_repo / AUTOREST_TEST_DIR / "requirements",
296283
)
297284

298-
# 3. Sync dev_requirements.txt
285+
# 2. Sync dev_requirements.txt
299286
print("Syncing dev_requirements.txt...")
300287
sync_dev_requirements(
301288
typespec_repo / TYPESPEC_DEV_REQUIREMENTS,
302289
autorest_repo / AUTOREST_DEV_REQUIREMENTS,
303290
)
304291

305-
# 4. Sync test files
292+
# 3. Sync test files
306293
print("Syncing test files...")
307294
sync_test_files(
308295
typespec_repo / TYPESPEC_TEST_DIR,
309296
autorest_repo / AUTOREST_TEST_DIR,
310297
)
311298

312-
# 5. Format TypeScript files
299+
# 4. Format TypeScript files
313300
ts_python_dir = autorest_repo / "packages" / "typespec-python"
314301
print("Running pnpm format...")
315302
result = subprocess.run(

0 commit comments

Comments
 (0)