feat: 内部署名改为编译期注入(构建机本地文件,不进仓库);关于页展示
This commit is contained in:
1 parent
d288e2bb22
commit
76e725ca96
6 files changed
+66
-1
No files matched your search
+11
-1
@@ -30,7 +30,17 @@ cd ..
|
||||
echo === [3/5] server build ===
|
||||
cd server
|
||||
if not exist ..\dist mkdir ..\dist
|
||||
go build -o ..\dist\scoreboard.exe . || exit /b 1
|
||||
REM 内部署名从构建机本地文件注入(deploy\signature.local.txt 已 gitignore,不进公开仓库);
|
||||
REM 文件不存在时二进制里也是空的,源码永远不含真实署名。
|
||||
set "INTERNAL_SIGNATURE="
|
||||
if exist "..\deploy\signature.local.txt" set /p INTERNAL_SIGNATURE=<"..\deploy\signature.local.txt"
|
||||
if defined INTERNAL_SIGNATURE (
|
||||
go build -ldflags "-X git.yeij.top/AskaEth/Scoreboard/server/internal/version.InternalSignature=%INTERNAL_SIGNATURE%" -o ..\dist\scoreboard.exe . || exit /b 1
|
||||
echo internal signature injected
|
||||
) else (
|
||||
go build -o ..\dist\scoreboard.exe . || exit /b 1
|
||||
echo no internal signature
|
||||
)
|
||||
cd ..
|
||||
|
||||
echo === [4/5] console deps ===
|
||||
|
||||
Reference in new issue
Block a user