mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-21 18:46:08 +00:00
- Add build.sh script that ensures frontend is copied before Go build - Update backend-watch.sh to sync frontend on every restart - Remove duplicate frontend files from internal/api/ - Frontend embed directory already in .gitignore - No more manual copying needed - just run ./build.sh
26 lines
No EOL
625 B
Bash
Executable file
26 lines
No EOL
625 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Build script for Pulse that ensures frontend is in the right place for embedding
|
|
|
|
set -e
|
|
|
|
echo "Building Pulse..."
|
|
|
|
# Build frontend
|
|
echo "Building frontend..."
|
|
cd frontend-modern
|
|
npm run build
|
|
|
|
# Ensure the embed directory exists and is up to date
|
|
echo "Preparing frontend for embedding..."
|
|
mkdir -p ../internal/api/frontend-modern
|
|
rm -rf ../internal/api/frontend-modern/dist
|
|
cp -r dist ../internal/api/frontend-modern/
|
|
|
|
# Build backend with embedded frontend
|
|
echo "Building backend..."
|
|
cd ..
|
|
go build -o pulse ./cmd/pulse
|
|
|
|
echo "Build complete!"
|
|
echo "To run: ./pulse or sudo systemctl restart pulse-backend" |