Pulse/scripts/rebuild-frontend.sh
Pulse Monitor d5d359ce45 fix: update systems to work with embedded frontend
- Fix auto-updater to handle single-binary structure
- Fix Docker build to copy frontend before Go compilation
- Add development script for frontend rebuilds
- Remove unnecessary frontend directory copying in updater

The embedded frontend change simplifies deployment but required
updates to various build and update systems.
2025-08-12 12:52:27 +00:00

24 lines
No EOL
472 B
Bash
Executable file

#!/bin/bash
# Script to rebuild frontend for development with embedded frontend
set -e
cd /opt/pulse
echo "Building frontend..."
cd frontend-modern
npm run build
cd ..
echo "Copying frontend for embedding..."
rm -rf internal/api/frontend-modern
cp -r frontend-modern internal/api/
echo "Rebuilding Go binary with embedded frontend..."
go build -o pulse ./cmd/pulse
echo "Restarting service..."
sudo systemctl restart pulse-backend
echo "Frontend rebuild complete!"