Seed/update .ci pipeline from manifest-updater v1.1.2

This commit is contained in:
manifest-updater pipeline seed
2026-06-23 19:19:01 +00:00
parent 7c423d989e
commit 56951344b3
2 changed files with 40 additions and 1 deletions
+12 -1
View File
@@ -157,11 +157,21 @@ ICONS='{}'
if [ -f icons/icon-256x256.png ]; then
ICONS="$(printf '{"1x":"%s/icon-128x128.png","2x":"%s/icon-256x256.png"}' "${RAW}" "${RAW}")"
fi
python3 - "$NAME" "$SLUG" "$VER" "$DL" "$HOST/${CHANNEL%/*}/$SLUG" "$REQ" "$TESTED" "$RPHP" "$NOW" "$ICONS" > computed.json <<'PY'
# screenshot images (screenshots/screenshot-N.ext) -> {N: filename}; build-manifest
# pairs these with the readme == Screenshots == captions into the `screenshots` field.
SHOTS='{}'
if [ -d screenshots ]; then
SHOTS="$(ls screenshots 2>/dev/null | python3 -c 'import sys,re,json;print(json.dumps({m.group(1):m.group(0) for m in (re.match(r"screenshot-(\d+)\.(?:png|jpe?g|gif|webp)$",f,re.I) for f in sys.stdin.read().split()) if m}))' || echo '{}')"
fi
python3 - "$NAME" "$SLUG" "$VER" "$DL" "$HOST/${CHANNEL%/*}/$SLUG" "$REQ" "$TESTED" "$RPHP" "$NOW" "$ICONS" "$SHOTS" "$RAW" > computed.json <<'PY'
import json, sys
k = ["name","slug","version","download_url","homepage","requires","tested","requires_php","last_updated"]
d = dict(zip(k, sys.argv[1:10]))
d["icons"] = json.loads(sys.argv[10])
shots = json.loads(sys.argv[11])
if shots:
raw = sys.argv[12]
d["_screenshots"] = {n: f"{raw}/{fn}" for n, fn in shots.items()}
json.dump(d, sys.stdout)
PY
@@ -175,6 +185,7 @@ mkdir -p "_upd/${SLUG}"
rm -f "_upd/${SLUG}"/*.zip
cp "${ZIP}" "_upd/${SLUG}/"
[ -d icons ] && cp icons/icon-128x128.png icons/icon-256x256.png "_upd/${SLUG}/" 2>/dev/null || true
[ -d screenshots ] && cp screenshots/screenshot-*.* "_upd/${SLUG}/" 2>/dev/null || true
( cd _upd
git config user.email "ci@${SSH_HOST}"