Some checks failed
Release Build / test-and-build (push) Failing after 1m8s
24 lines
422 B
Bash
Executable file
24 lines
422 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Check if we're in production mode
|
|
PROD_MODE=${NODE_ENV:-development}
|
|
GO_FLAGS=""
|
|
|
|
if [ "$PROD_MODE" = "production" ]; then
|
|
echo "Building in production mode..."
|
|
GO_FLAGS="-ldflags=-s -w"
|
|
fi
|
|
|
|
# Build frontend
|
|
cd frontend
|
|
bun install
|
|
bun run build
|
|
cd ..
|
|
|
|
# Copy static assets
|
|
mkdir -p build/css
|
|
cp static/css/bulma.min.css build/css/
|
|
|
|
# Build backend
|
|
go build $GO_FLAGS -o notes-app
|