From 31f7bcddf8d1c8043231800eacde6ec56c4ad615 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 19:44:56 +0000 Subject: [PATCH] publish-public: a platform the manifest lacks keeps the newest versioned file already in dl/public, stamped with its own version (a staggered publish never darkens a link or names an absent version) Co-Authored-By: Claude Fable 5.1 --- packaging/ota/publish-public.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packaging/ota/publish-public.sh b/packaging/ota/publish-public.sh index 0f8b67b00..5b1a4f5f5 100755 --- a/packaging/ota/publish-public.sh +++ b/packaging/ota/publish-public.sh @@ -123,11 +123,21 @@ fi ALIASES_JSON="$(python3 - "$PUB" "$DRY" <<'PY' import json, os, re, sys pub, dry = sys.argv[1], sys.argv[2] == "1" +# a platform the current manifest lacks keeps the newest versioned file of that platform already in dl/public/ (6 October +# 2026, 0.3.15: the Mac row moved first while the Windows installer waited on the GitHub billing block; the Windows link of the site +# must stay on the version that exists, never go dark, and never name a version that is not there). The index below +# reads such a file"s version from its name, so the site stamps the carried version honestly. +CARRY = {"windows": r"Igneum-Miner-Setup-(\d+\.\d+\.\d+)\.exe", "mac": r"Igneum-Miner-(\d+\.\d+\.\d+)\.dmg"} +def newest(pattern): + fs = [f for f in os.listdir(pub) if re.fullmatch(pattern, f)] if os.path.isdir(pub) else [] + fs.sort(key=lambda f: tuple(int(x) for x in re.findall(r"\d+", f)[:3])) + return fs[-1] if fs else None def entry(name, plat): p = os.path.join(pub, name) if not os.path.exists(p): return None e = json.load(open(p)).get("platforms", {}).get(plat) - if not e: return None + if not e: + return newest(CARRY[plat]) if name == "igneum-app-latest.json" and plat in CARRY else None f = e["url"].rsplit("/", 1)[1] return f if os.path.exists(os.path.join(pub, f)) or dry else None hive = sorted([f for f in os.listdir(pub) if re.fullmatch(r"igneum-hive-\d+\.\d+\.\d+\.tar\.gz", f)], @@ -178,6 +188,9 @@ def sha(p): def version_of(name, f): if name.startswith("igneum-miner-hive"): return ".".join(re.findall(r"\d+", f)[:3]) m = json.load(open(os.path.join(pub, "igneum-wallet-latest.json" if name.startswith("igneum-wallet") else "igneum-app-latest.json"))) + plat = "windows" if name == "igneum-miner-windows.exe" else "mac" + if name.startswith("igneum-miner") and not m.get("platforms", {}).get(plat): + return ".".join(re.findall(r"\d+", f)[:3]) # a carried file: the version in its name, not the one of the manifest return m.get("version") keys = {"igneum-miner-windows.exe": "miner-windows", "igneum-miner-mac.dmg": "miner-mac", "igneum-miner-hive.tar.gz": "miner-hive", "igneum-wallet-mac.dmg": "wallet-mac"} files = {}