a5ec8db5f7
build / build (push) Failing after 5s
dependency (SDL2, SDL2_mixer, fluidsynth-lite, a MIDI soundfont) prebuilt, so compiling the engine needs no network access - just the image and the engine source. Add res/assets/extract_assets.sh to pull the game's data files out of a purchased GOG installer, and a Makefile that assembles a runnable dist/ from the two. Also add `make package`, which builds a redistributable tarball that omits the proprietary game assets (shipping res/GET_ASSETS.txt instead) plus license information for both the MIT tooling and the GPLv3 engine, and a Gitea Actions workflow that builds and publishes it to dl.ladkau.de on every push.
35 lines
1001 B
Bash
Executable File
35 lines
1001 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds the engine build-image (build-image/Dockerfile) locally, tagged
|
|
# with build-image/VERSION and :latest. Does not push - test it with
|
|
# ./run-image.sh first, then publish with ./upload-image.sh.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
ROOT="$(pwd)"
|
|
|
|
fail() { echo "PREFLIGHT FAIL: $*" >&2; exit 1; }
|
|
|
|
command -v docker >/dev/null 2>&1 \
|
|
|| fail "docker not found in PATH"
|
|
|
|
IMAGE="${REGISTRY_IMAGE:-questshock/builder}"
|
|
if [ -f "$ROOT/registry.env" ]; then
|
|
# shellcheck disable=SC1091
|
|
source "$ROOT/registry.env"
|
|
IMAGE="${REGISTRY_IMAGE:-$IMAGE}"
|
|
fi
|
|
|
|
VERSION="$(<"$ROOT/build-image/VERSION")"
|
|
[ -n "$VERSION" ] || fail "build-image/VERSION is empty"
|
|
|
|
echo "== Building $IMAGE:$VERSION =="
|
|
docker build \
|
|
-f "$ROOT/build-image/Dockerfile" \
|
|
-t "$IMAGE:$VERSION" \
|
|
-t "$IMAGE:latest" \
|
|
"$ROOT"
|
|
|
|
echo "== Done =="
|
|
echo "Image: $IMAGE:$VERSION (and :latest)"
|
|
echo "Test it with ./run-image.sh, then publish with ./upload-image.sh"
|