This commit is contained in:
2026-03-06 19:42:15 +00:00
parent abcbe3e1e5
commit 04cbb846d1
99 changed files with 11724 additions and 0 deletions

25
scripts/build.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
echo "Building frontend..."
cd "$ROOT_DIR/frontend"
bun install
bun run build
echo "Copying frontend dist to backend embed location..."
rm -rf "$ROOT_DIR/backend/cmd/server/frontend_dist"
cp -r "$ROOT_DIR/frontend/dist" "$ROOT_DIR/backend/cmd/server/frontend_dist"
echo "Copying migrations to backend embed location..."
rm -rf "$ROOT_DIR/backend/cmd/server/migrations"
mkdir -p "$ROOT_DIR/backend/cmd/server/migrations"
cp "$ROOT_DIR/backend/migrations"/*.sql "$ROOT_DIR/backend/cmd/server/migrations/"
echo "Building backend..."
cd "$ROOT_DIR/backend"
go build -o "$ROOT_DIR/server" ./cmd/server
echo "Build complete: ./server"