Alpacca/build.sh
zervo 47263ae585 Fix build script
Fix build script go syntax,
And remove the emoji stuffs (didn't like it)
2025-07-23 22:31:15 +02:00

26 lines
No EOL
557 B
Bash
Executable file

#!/bin/bash
set -e
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SRC_DIR="$ROOT_DIR/src"
FRONTEND_DIR="$SRC_DIR/web"
BACKEND_DIR="$SRC_DIR"
BACKEND_PKG="git.zervo.org/zervo/alpacca/cmd/alpacca"
OUTPUT_DIR="$ROOT_DIR/out"
echo "Cleaning previous build..."
rm -rf "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR"
echo "Building frontend with Bun..."
cd "$FRONTEND_DIR"
bun install
bun run build
echo "Building Go backend..."
cd "$BACKEND_DIR"
go build -v -o "$OUTPUT_DIR" $BACKEND_PKG
cd "$ROOT_DIR"
echo "Build completed. Output located in: $OUTPUT_DIR"