#!/usr/bin/env bash # build/linux.sh [version] # Builds out/linux-x64/{libygol-engine.so, ygoserver, engine.json} in Docker (build/Dockerfile, target # linux). Needs nothing on the host but Docker. [version] is what ygol_engine_version() returns. set -euo pipefail repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" version="${1:-local}" DOCKER_BUILDKIT=1 docker build --progress=plain -f "$repo/build/Dockerfile" --target linux \ --build-arg "VERSION=$version" -o "$repo/out/linux-x64" "$repo" echo echo "Built: $repo/out/linux-x64" cat "$repo/out/linux-x64/engine.json"