fix(build): 署名自检改用 Node 字节比对(findstr 在 chcp 65001 下匹配不了 UTF-8 中文)

findstr 会误报 NOT found,而实测 exe 里署名是存在的。改成 verify-signature.mjs
读字节 includes 比对,缺失时让构建硬失败。
This commit is contained in:
AskaEth committed 2026-09-09 22:21:28 +08:00
1 parent e7948088df
commit 8039da384d
2 files changed
+28 -1

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ if exist "..\deploy\signature.build.txt" for /f "usebackq delims= eol=" %%A in (
if defined INTERNAL_SIGNATURE (
REM single quotes keep spaces inside the value intact for go's ldflags parser
go build -ldflags "-X 'git.yeij.top/AskaEth/Scoreboard/server/internal/version.InternalSignature=%INTERNAL_SIGNATURE%'" -o ..\dist\scoreboard.exe . || exit /b 1
findstr /m /c:"%INTERNAL_SIGNATURE%" ..\dist\scoreboard.exe >nul || echo [warn] signature NOT found in exe
node ..\deploy\verify-signature.mjs || exit /b 1
echo internal signature injected
) else (
go build -o ..\dist\scoreboard.exe . || exit /b 1