Skip to content

Commit 70ce353

Browse files
committed
fix(release): make latest checks shell portable
1 parent 093d88c commit 70ce353

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release-claw-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ jobs:
891891
if ! jq -e \
892892
--arg component "claw-server-rust/prod-resources" \
893893
--arg target "$target" \
894-
'.Metadata.component == $component and .Metadata.target == $target and ((.Metadata.version // "") | test("^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$")) and ((.Metadata["release-sha"] // "") | test("^[0-9a-f]{40}$")) and ((.Metadata.sha256 // "") | test("^[0-9a-f]{64}$")) and (.ContentLength > 0)' \
894+
'.Metadata.component == $component and .Metadata.target == $target and ((.Metadata.version // "") | test("^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)$")) and ((.Metadata["release-sha"] // "") | test("^[0-9a-f]{40}$")) and ((.Metadata.sha256 // "") | test("^[0-9a-f]{64}$")) and (.ContentLength > 0)' \
895895
<<< "$destination_head" >/dev/null; then
896896
echo "::error::Latest R2 alias has an invalid binding: $destination"
897897
exit 1

.github/workflows/release-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ jobs:
469469
if ! jq -e \
470470
--arg component "artifacts/server" \
471471
--arg target "$target" \
472-
'.Metadata.component == $component and .Metadata.target == $target and ((.Metadata.version // "") | test("^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$")) and ((.Metadata["release-sha"] // "") | test("^[0-9a-f]{40}$")) and ((.Metadata.sha256 // "") | test("^[0-9a-f]{64}$")) and (.ContentLength > 0)' \
472+
'.Metadata.component == $component and .Metadata.target == $target and ((.Metadata.version // "") | test("^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)$")) and ((.Metadata["release-sha"] // "") | test("^[0-9a-f]{40}$")) and ((.Metadata.sha256 // "") | test("^[0-9a-f]{64}$")) and (.ContentLength > 0)' \
473473
<<< "$destination_head" >/dev/null; then
474474
echo "::error::Latest R2 alias has an invalid binding: $destination"
475475
exit 1

packages/browseros/bos_build/ci_workflow_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,10 @@ def test_server_latest_aliases_reconcile_monotonically_inside_retained_lock(self
11341134
self.assertIn("already newer", script)
11351135
self.assertIn("already matches version, source, and checksum", script)
11361136
self.assertIn("conflicts at version", script)
1137+
self.assertIn(
1138+
'test("^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)$"))',
1139+
script,
1140+
)
11371141
self.assertIn("copy-object", script)
11381142
self.assertLess(
11391143
script.index("already newer"), script.index("copy-object")

0 commit comments

Comments
 (0)