Files
modbison/scripts/build.sh
T
daddy 145af47068
checkpoint / checkpoint (push) Successful in 5m59s
chore: rename repo references and build presets to modbison
2026-09-17 18:41:48 +00:00

43 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Headless CI export for Linux and Windows.
#
# Requires:
# - Godot 4.6.2 (the exact version this project + export_presets.cfg were
# built against; a different Godot minor version's export templates are
# not guaranteed compatible)
# - The matching export templates installed at
# ~/.local/share/godot/export_templates/4.6.2.stable/
# (download: https://godotengine.org/download/archive/4.6.2-stable/,
# "Export templates" -- NOT the same as the editor download)
# - godot on PATH (or set GODOT_BIN below)
#
# Usage: scripts/build.sh
# Output: export/linux/modbison.x86_64, export/windows/modbison.exe
set -euo pipefail
cd "$(dirname "$0")/.."
GODOT_BIN="${GODOT_BIN:-godot}"
if ! command -v "$GODOT_BIN" >/dev/null 2>&1; then
if [ -x "$HOME/godot/godot" ]; then
GODOT_BIN="$HOME/godot/godot"
else
echo "godot binary not found (checked PATH and ~/godot/godot)." >&2
exit 1
fi
fi
echo "Godot version: $("$GODOT_BIN" --version)"
mkdir -p export/linux export/windows
echo "=== Exporting Linux/X11 ==="
"$GODOT_BIN" --headless --path . --export-release "Linux" export/linux/modbison.x86_64
echo "=== Exporting Windows Desktop ==="
"$GODOT_BIN" --headless --path . --export-release "Windows Desktop" export/windows/modbison.exe
echo ""
echo "Build artifacts:"
ls -la export/linux export/windows