Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(release): force-fetch updated release branch (#2290)

Francesco Bonacci4db3fe32adb1
diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.py
index 06a94291cb..7818987e87 100644
--- a/.github/scripts/tests/test_cua_driver_release_wiring.py
+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py
@@ -48,6 +48,10 @@ class TestCuaDriverReleaseWiring(unittest.TestCase):
"gh pr list --state open --base main --limit 100 --json number",
workflow,
)
+ self.assertIn(
+ 'git fetch origin "+refs/heads/$BRANCH:refs/remotes/origin/$BRANCH"',
+ workflow,
+ )
self.assertNotIn("if: steps.release.outputs.prs_created == 'true'", workflow)
self.assertNotIn("RELEASE_PRS: ${{ steps.release.outputs.prs }}", workflow)
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 2700e363db..71cfc9a38c 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -60,7 +60,9 @@ jobs:
exit 1
fi
- git fetch origin "refs/heads/$BRANCH:refs/remotes/origin/$BRANCH"
+ # release-please updates the remote branch after checkout, so the
+ # checkout-created remote-tracking ref can no longer fast-forward.
+ git fetch origin "+refs/heads/$BRANCH:refs/remotes/origin/$BRANCH"
git checkout -B "$BRANCH" "origin/$BRANCH"
DRIVER_VERSION=$(tr -d '[:space:]' < libs/cua-driver/rust/VERSION)
cargo update --manifest-path libs/cua-driver/rust/Cargo.toml \