mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 01:09:23 +00:00
fix: ci failed (#4353)
This commit is contained in:
@@ -297,6 +297,7 @@ jobs:
|
|||||||
|
|
||||||
read -r console_url console_sha256 < <("$python_bin" - "$console_json" <<'PY'
|
read -r console_url console_sha256 < <("$python_bin" - "$console_json" <<'PY'
|
||||||
import json
|
import json
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
with open(sys.argv[1], encoding="utf-8") as handle:
|
with open(sys.argv[1], encoding="utf-8") as handle:
|
||||||
@@ -307,7 +308,10 @@ jobs:
|
|||||||
digest = asset.get("digest", "")
|
digest = asset.get("digest", "")
|
||||||
url = asset.get("browser_download_url", "")
|
url = asset.get("browser_download_url", "")
|
||||||
if name.startswith("rustfs-console-") and name.endswith(".zip") and digest.startswith("sha256:") and url:
|
if name.startswith("rustfs-console-") and name.endswith(".zip") and digest.startswith("sha256:") and url:
|
||||||
print(url, digest.split(":", 1)[1])
|
sha256 = digest.split(":", 1)[1]
|
||||||
|
if not re.fullmatch(r"[0-9a-fA-F]{64}", sha256):
|
||||||
|
raise SystemExit(f"console zip asset has invalid sha256 digest: {sha256}")
|
||||||
|
sys.stdout.buffer.write(f"{url} {sha256}\n".encode("utf-8"))
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise SystemExit("no console zip asset with sha256 digest found")
|
raise SystemExit("no console zip asset with sha256 digest found")
|
||||||
|
|||||||
Reference in New Issue
Block a user