build: 增加 Windows 一键构建脚本 deploy/build.bat

This commit is contained in:
AskaEth committed 2026-09-09 18:41:03 +08:00
1 parent b62bb022bd
commit 0d32903b1a
1 file changed
+28
+28
View File
@@ -0,0 +1,28 @@
@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