#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUT="$SCRIPT_DIR/backend/dist/sproutclaw-web-backend"

echo "[build] compiling Go backend -> $OUT"
cd "$SCRIPT_DIR/backend"
go build -o "$OUT" ./cmd/server
chmod +x "$OUT"
echo "[build] done: $OUT"
