From e2465b407a79beee6f16d5778936f9e65a4d823e Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Mon, 4 May 2026 17:08:21 -0700 Subject: [PATCH] [bfops/move-upgrade-version]: cargo ci version-upgrade-check --- .github/workflows/ci.yml | 2 +- tools/ci/README.md | 11 +++++++++++ tools/ci/src/main.rs | 21 +++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ff2ca90a..e14244ea1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1246,6 +1246,6 @@ jobs: with: run_install: true - name: Verify that upgrade-version still works - run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript --cpp --accept-snapshots + run: cargo ci version-upgrade-check - name: Show diff run: git diff HEAD diff --git a/tools/ci/README.md b/tools/ci/README.md index dbe452243..3530ee24b 100644 --- a/tools/ci/README.md +++ b/tools/ci/README.md @@ -217,6 +217,17 @@ Usage: typescript-test - `--help`: Print help +### `version-upgrade-check` + +**Usage:** +```bash +Usage: version-upgrade-check +``` + +**Options:** + +- `--help`: Print help + ### `docs` **Usage:** diff --git a/tools/ci/src/main.rs b/tools/ci/src/main.rs index 3c31c3663..146651c10 100644 --- a/tools/ci/src/main.rs +++ b/tools/ci/src/main.rs @@ -276,6 +276,8 @@ enum CiCmd { PublishChecks, /// Runs TypeScript workspace tests and template build checks. TypescriptTest, + /// Verifies that the repository version upgrade tool still works. + VersionUpgradeCheck, /// Builds the docs site. Docs, } @@ -443,6 +445,21 @@ fn run_docs_build() -> Result<()> { Ok(()) } +fn run_version_upgrade_check() -> Result<()> { + cmd!( + "cargo", + "bump-versions", + "123.456.789", + "--rust-and-cli", + "--csharp", + "--typescript", + "--cpp", + "--accept-snapshots" + ) + .run()?; + Ok(()) +} + fn main() -> Result<()> { env_logger::init(); @@ -711,6 +728,10 @@ fn main() -> Result<()> { run_typescript_tests()?; } + Some(CiCmd::VersionUpgradeCheck) => { + run_version_upgrade_check()?; + } + Some(CiCmd::Docs) => { run_docs_build()?; }