16 lines
290 B
Bash
16 lines
290 B
Bash
#!/bin/bash
|
|||
|
|
set -e
|
||
|
|
|
||
|
|
echo "=== 1. Build frontend ==="
|
||
|
|
cd frontend
|
||
|
|
npm run build
|
||
|
|
|
||
|
|
echo "=== 2. Copy frontend output to public/ ==="
|
||
|
|
cd ..
|
||
|
|
rm -rf public/*
|
||
|
|
cp -r frontend/dist/* public/
|
||
|
|
|
||
|
|
echo "=== 3. Build Go binary ==="
|
||
|
|
go build -o bj_power_mes .
|
||
|
|
|
||
|
|
echo "=== Build complete: ./bj_power_mes ==="
|