fix(update-all): run build-modlist.py under python >=3.11
The host's default python3 may predate stdlib tomllib (cochi/Ubuntu 22.04 ships 3.10), so the shebang-resolved python3 failed the version guard and strict-halt aborted the run. Pick the first python3.11+ interpreter instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -58,8 +58,19 @@ step "sync-server-mods.sh"
|
||||
tooling/sync-server-mods.sh
|
||||
|
||||
# ── 3. regenerate the landing mod list (mods.json + logos) ──────────
|
||||
# build-modlist.py needs stdlib tomllib (Python >=3.11). The host's default
|
||||
# `python3` may be older (e.g. Ubuntu 22.04 ships 3.10), so pick the first
|
||||
# interpreter that satisfies it rather than relying on the shebang.
|
||||
step "build-modlist.py"
|
||||
tooling/build-modlist.py
|
||||
PY=""
|
||||
for p in python3.13 python3.12 python3.11 python3; do
|
||||
command -v "$p" >/dev/null 2>&1 || continue
|
||||
if "$p" -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 11) else 1)' 2>/dev/null; then
|
||||
PY="$p"; break
|
||||
fi
|
||||
done
|
||||
[ -n "$PY" ] || { echo "no python >=3.11 found (build-modlist.py needs stdlib tomllib)" >&2; exit 1; }
|
||||
"$PY" tooling/build-modlist.py
|
||||
|
||||
# ── 4. rebuild the landing site into www/ (gitignored — pull never
|
||||
# updates it, so it must be rebuilt every run) ─────────────────
|
||||
|
||||
Reference in New Issue
Block a user