Files
Scoreboard/deploy/build.bat
T

29 lines
609 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
REM 在 Windows 构建机(Meowhome)上一键构建 Windows 产物。
REM 产物:dist\scoreboard.exe(前端已由 go:embed 内嵌)
setlocal
cd /d "%~dp0.."
echo === [1/4] git pull ===
git pull || exit /b 1
echo === [2/4] pnpm install ===
cd web
call pnpm install --frozen-lockfile || exit /b 1
echo === [3/4] 前端构建(输出到 server\internal\webui\assets) ===
call pnpm build || exit /b 1
cd ..
echo === [4/4] go build ===
cd server
if not exist ..\dist mkdir ..\dist
go build -o ..\dist\scoreboard.exe . || exit /b 1
cd ..
echo.
echo === 构建完成 ===
dir dist
endlocal