Fix release workflow python heredoc
Some checks failed
ci / build (push) Has been cancelled

This commit is contained in:
2026-02-24 10:31:03 +00:00
parent 31fc9fe654
commit 6c7730eb7f

View File

@@ -133,24 +133,8 @@ jobs:
exit 0
fi
TAG="${GITHUB_REF#refs/tags/}"
RELAY_VER=$(cargo metadata --format-version 1 | python - <<'PY'
import json,sys
meta=json.load(sys.stdin)
for pkg in meta['packages']:
if pkg['name']=='relay':
print(pkg['version'])
break
PY
)
CLIENT_VER=$(cargo metadata --format-version 1 | python - <<'PY'
import json,sys
meta=json.load(sys.stdin)
for pkg in meta['packages']:
if pkg['name']=='client':
print(pkg['version'])
break
PY
)
RELAY_VER=$(cargo metadata --format-version 1 | python -c 'import json,sys;meta=json.load(sys.stdin);print([p["version"] for p in meta["packages"] if p["name"]=="relay"][0])')
CLIENT_VER=$(cargo metadata --format-version 1 | python -c 'import json,sys;meta=json.load(sys.stdin);print([p["version"] for p in meta["packages"] if p["name"]=="client"][0])')
if [[ "v${RELAY_VER}" != "${TAG}" ]]; then
echo "Tag ${TAG} does not match relay version v${RELAY_VER}; skipping relay publish"
else