d68f003000
CI / Change detection (push) Has been cancelled
CI / Version drift (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Workflow RLM cache (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / npm wrapper smoke (push) Has been cancelled
CI / Mobile runtime smoke (push) Has been cancelled
CI / Workflow lint (push) Has been cancelled
CI / Documentation (push) Has been cancelled
Web Frontend / Lint & Type Check (push) Failing after 1s
Auto-close harvested PRs / close (push) Failing after 1s
cargo-deny / cargo-deny (bans licenses sources) (push) Failing after 1s
Security audit / cargo-audit (push) Failing after 1s
Sync to CNB / sync (push) Failing after 1s
Web Frontend / Deploy to Cloudflare (push) Waiting to run
cargo-deny / cargo-deny (advisories) (push) Failing after 3s
37 lines
1017 B
Bash
Executable File
37 lines
1017 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
expected_version="${1:-}"
|
|
if [[ -z "${expected_version}" && "${GITHUB_REF:-}" == refs/tags/v* ]]; then
|
|
expected_version="${GITHUB_REF#refs/tags/v}"
|
|
fi
|
|
|
|
if [[ -z "${expected_version}" ]]; then
|
|
echo "usage: $0 <version>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
python3 - "${expected_version}" <<'PY'
|
|
import json
|
|
import subprocess
|
|
import sys
|
|
|
|
expected = sys.argv[1]
|
|
metadata = json.loads(
|
|
subprocess.check_output(["cargo", "metadata", "--format-version", "1", "--no-deps"])
|
|
)
|
|
workspace_members = set(metadata["workspace_members"])
|
|
packages = [pkg for pkg in metadata["packages"] if pkg["id"] in workspace_members]
|
|
mismatches = [
|
|
f"{pkg['name']}={pkg['version']}" for pkg in packages if pkg["version"] != expected
|
|
]
|
|
|
|
if mismatches:
|
|
print(f"Tag version {expected} does not match all workspace crates:", file=sys.stderr)
|
|
for item in mismatches:
|
|
print(f" - {item}", file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
print(f"Verified {len(packages)} workspace packages at version {expected}")
|
|
PY
|