Fix release pipeline: bepinex packaging + no silent failures
'GAME=BurglinGnomes ./tools/publish.sh' exited with zero output. Two causes: 1. build_release.sh was SUWSF-only and hard-failed on a missing SUWSF.ini for BepInEx games. It now reads METHOD from game.conf and packages BepInEx plus the prebuilt plugin instead. 2. publish.sh ran the build with stdout to /dev/null, so that error was invisible and killed the script silently. Build output is now shown and failure reported explicitly. Also: publish.sh creates the tag locally when missing (v1.1.0 never existed, so the tag push would have failed too), and defaults the release body to the game's own README so per-game notes are always accurate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+12
-4
@@ -14,22 +14,30 @@ OWNER="${GITEA_OWNER:-ckoch}"
|
||||
REPO="${GITEA_REPO:-UltraWidePatches}"
|
||||
GAME="${GAME:-GundamBreaker4}"
|
||||
TAG="${TAG:-v1.0.0}"
|
||||
NOTES="${NOTES:-RELEASE_NOTES.md}"
|
||||
NOTES="${NOTES:-games/$GAME/README.md}"
|
||||
[ -f "$NOTES" ] || NOTES="RELEASE_NOTES.md"
|
||||
API="$HOST/api/v1"
|
||||
|
||||
[ -n "${GITEA_TOKEN:-}" ] || { echo "[!] GITEA_TOKEN is not set. Create one at $HOST/user/settings/applications (scope: write:repository)"; exit 1; }
|
||||
AUTH=(-H "Authorization: token $GITEA_TOKEN")
|
||||
ZIPNAME="${GAME}_UltraWide_Fix.zip"
|
||||
|
||||
# 1. build the artifact
|
||||
bash tools/build_release.sh "$GAME" >/dev/null
|
||||
# 1. build the artifact -- do NOT swallow output; a failure here used to exit
|
||||
# the whole script silently because stdout went to /dev/null under `set -e`.
|
||||
if ! bash tools/build_release.sh "$GAME"; then
|
||||
echo "[!] build_release.sh failed for game '$GAME' (see above)"; exit 1
|
||||
fi
|
||||
ZIP="dist/$ZIPNAME"
|
||||
[ -f "$ZIP" ] || { echo "[!] build produced no $ZIP"; exit 1; }
|
||||
echo "[+] Built $ZIP"
|
||||
|
||||
# 2. push code + tag
|
||||
git push origin main
|
||||
git push origin "$TAG" 2>/dev/null || echo "[i] tag $TAG already on remote"
|
||||
if ! git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
|
||||
git tag -a "$TAG" -m "$TAG"
|
||||
echo "[+] Created tag $TAG at $(git rev-parse --short HEAD)"
|
||||
fi
|
||||
git push origin "$TAG" 2>&1 | tail -1
|
||||
|
||||
# 3. create the release (or reuse if it already exists)
|
||||
REL_ID=$(curl -sf "${AUTH[@]}" "$API/repos/$OWNER/$REPO/releases/tags/$TAG" 2>/dev/null \
|
||||
|
||||
Reference in New Issue
Block a user