Skip to content

Add auto-update script for SDK cmdline-tools versions - #6

Merged
warting merged 1 commit into
mainfrom
auto-update-sdk-versions
Mar 17, 2026
Merged

Add auto-update script for SDK cmdline-tools versions#6
warting merged 1 commit into
mainfrom
auto-update-sdk-versions

Conversation

@warting

@warting warting commented Mar 17, 2026

Copy link
Copy Markdown

Summary

  • Add scripts/update-sdk-versions.mjs that fetches stable versions from Google's repository2-3.xml and patches src/main.ts, build-test.yml, and action.yml
  • Add weekly workflow (Monday 6am UTC) that runs the script and creates a PR via GitHub App token
  • Also adds currently missing stable versions: 20.0, 19.0, 17.0, 6.0, 5.0, 4.0
  • Updates default cmdline-tools version to 20.0 (build 14742923)

How it works

  1. Script fetches the Android SDK repository XML
  2. Parses all stable (non-alpha/beta/rc, non-obsolete) cmdline-tools versions
  3. Compares with current src/main.ts switch statement
  4. If new versions found: updates version mapping, CI matrix, and action default
  5. Workflow commits, pushes, and creates a PR

Test plan

  • Script is idempotent (running twice produces no changes)
  • npm run build passes
  • npm test passes
  • CI passes for all versions including new ones (20.0, 19.0, 17.0, 6.0, 5.0, 4.0)

- Add scripts/update-sdk-versions.mjs that fetches stable versions from
  Google's repository2-3.xml and patches main.ts, build-test.yml, and
  action.yml
- Add weekly workflow that runs the script and creates a PR via GitHub
  App token
- Also adds missing versions: 20.0, 19.0, 17.0, 6.0, 5.0, 4.0
- Updates default cmdline-tools version to 20.0 (build 14742923)
@warting
warting force-pushed the auto-update-sdk-versions branch from 474f711 to 79afeb6 Compare March 17, 2026 10:35
@warting
warting merged commit 26c027a into main Mar 17, 2026
209 checks passed
@warting
warting deleted the auto-update-sdk-versions branch March 17, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant