#!/usr/bin/env bash # Repeatable visual-regression smoke: render the staged captures into # docs/screenshots and compare them against the runtime reference art. # # Runs under Xvfb automatically when no display is available. Requires Godot # 4.3 on PATH (or GODOT=...), Python 3, Pillow, and xvfb-run for headless hosts. set -euo pipefail cd "$(dirname "$0")/.." GODOT="${GODOT:-godot}" RUN=() if [[ -z "${DISPLAY:-}" ]]; then if ! command -v xvfb-run >/dev/null 2>&1; then echo "error: no DISPLAY and xvfb-run is not installed" >&2 exit 2 fi RUN=(xvfb-run -a) fi "${RUN[@]}" "$GODOT" --path . --script res://src/test/capture_screenshots.gd -- --out=res://docs/screenshots "${RUN[@]}" "$GODOT" --path . --script res://src/test/capture_prop_gallery.gd -- --out=res://docs/screenshots python3 tools/screen_designs.py compare