'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>
47 lines
1.8 KiB
Bash
Executable File
47 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build a drop-in release zip for one game. Handles both fix methods.
|
|
# ./tools/build_release.sh GundamBreaker4 (METHOD=suwsf)
|
|
# ./tools/build_release.sh BurglinGnomes (METHOD=bepinex)
|
|
# Output: dist/<Game>_UltraWide_Fix.zip
|
|
set -euo pipefail
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$HERE"
|
|
|
|
GAME="${1:?usage: build_release.sh <GameName>}"
|
|
GDIR="games/$GAME"
|
|
[ -d "$GDIR" ] || { echo "[!] no such game: $GDIR"; exit 1; }
|
|
[ -f "$GDIR/game.conf" ] || { echo "[!] missing $GDIR/game.conf"; exit 1; }
|
|
# shellcheck disable=SC1090
|
|
. "$GDIR/game.conf"
|
|
METHOD="${METHOD:-suwsf}"
|
|
|
|
OUT="dist/${GAME}_UltraWide_Fix"
|
|
rm -rf "$OUT" "$OUT.zip"
|
|
mkdir -p "$OUT"
|
|
|
|
if [ "$METHOD" = "bepinex" ]; then
|
|
BEPZIP=$(ls vendor/BepInEx_win_x64_*.zip 2>/dev/null | head -1)
|
|
[ -f "$BEPZIP" ] || { echo "[!] missing BepInEx zip in vendor/"; exit 1; }
|
|
[ -f "$GDIR/$PLUGIN_DLL" ] || { echo "[!] missing prebuilt plugin $GDIR/$PLUGIN_DLL"; exit 1; }
|
|
command -v unzip >/dev/null || { echo "[!] unzip required"; exit 1; }
|
|
unzip -o -q "$BEPZIP" -d "$OUT"
|
|
mkdir -p "$OUT/BepInEx/plugins"
|
|
cp "$GDIR/$PLUGIN_DLL" "$OUT/BepInEx/plugins/"
|
|
echo "[+] Packaged BepInEx + $PLUGIN_DLL"
|
|
else
|
|
V="vendor/SUWSF-x64"
|
|
for f in "$V/SUWSF.asi" "$V/dsound.dll" "$V/LICENSE" "$GDIR/SUWSF.ini"; do
|
|
[ -f "$f" ] || { echo "[!] missing $f"; exit 1; }
|
|
done
|
|
cp "$V/SUWSF.asi" "$V/dsound.dll" "$GDIR/SUWSF.ini" "$OUT/"
|
|
cp "$V/LICENSE" "$OUT/SUWSF-LICENSE.txt"
|
|
echo "[+] Packaged SUWSF + patch ini"
|
|
fi
|
|
|
|
cp "$GDIR/README.md" "$OUT/README.md" 2>/dev/null || true
|
|
cp THIRD_PARTY.md LICENSE "$OUT/" 2>/dev/null || true
|
|
|
|
( cd dist && zip -r -q "${GAME}_UltraWide_Fix.zip" "${GAME}_UltraWide_Fix" )
|
|
echo "[+] Built dist/${GAME}_UltraWide_Fix.zip"
|
|
( cd dist && sha256sum "${GAME}_UltraWide_Fix.zip" )
|