修改构建脚本

This commit is contained in:
sk 2024-07-08 10:18:19 +08:00
parent 0f2404bf12
commit cdd855bfb2
12 changed files with 77 additions and 59 deletions

View File

@ -2,15 +2,9 @@ go env -w GO111MODULE=off
@echo off @echo off
call shell/build_sub.bat dbproxy call shell/build.bat
call shell/build_sub.bat mgrsrv
call shell/build_sub.bat gatesrv
call shell/build_sub.bat worldsrv
call shell/build_sub.bat gamesrv
call shell/build_sub.bat robot
call shell/build_sub.bat ranksrv
@echo "Wait all build task complete!" echo "Wait all build task complete!"
if %errorcode% neq 0 ( if %errorcode% neq 0 (
pause pause

View File

@ -1,5 +1,14 @@
set CGO_ENABLED=0 set CGO_ENABLED=0
set GOOS=linux set GOOS=linux
set GOARCH=amd64 set GOARCH=amd64
go env -w GO111MODULE=off
call build.bat @echo off
call shell/build.bat
echo "Wait all build task complete!"
if %errorcode% neq 0 (
pause
)

Binary file not shown.

Binary file not shown.

View File

@ -1,34 +1,37 @@
rem 切换到develop分支 @echo off
set work_path=%cd%
git checkout develop git checkout develop
rem 生成配置文件
call shell/gen_data.bat call shell/gen_data.bat
rem 生产protocol
call shell/gen_go.bat call shell/gen_go.bat
rem 提交public call shell/update_public.bat
call update_public.bat
rem 提交develop
git add . git add .
git add public
git commit -m "update develop" git commit -m "update develop"
rem 切换release
git checkout release git checkout release
rem 合并develop分支
git merge develop git merge develop
rem 提交release
git add . git add .
git add public
git commit -m "update release" git commit -m "update release"
rem 编译 set CGO_ENABLED=0
call build_linux.bat set GOOS=linux
set GOARCH=amd64
go env -w GO111MODULE=off
call shell/build.bat
rem 提交deploy仓库 rem copy
call update_deploy.bat cd %work_path%
call shell/update_deploy.bat
git checkout develop
pause

2
public

@ -1 +1 @@
Subproject commit fcb24ec4f50716936ebb587e84867835b4dba2fc Subproject commit 1979cd52fb471bf87bce124133da8d9996ffa3e4

7
shell/build.bat Normal file
View File

@ -0,0 +1,7 @@
call shell/build_sub.bat dbproxy
call shell/build_sub.bat mgrsrv
call shell/build_sub.bat gatesrv
call shell/build_sub.bat worldsrv
call shell/build_sub.bat gamesrv
call shell/build_sub.bat robot
call shell/build_sub.bat ranksrv

View File

@ -12,3 +12,4 @@ cd ../../protocol/server
cd ../../tools/xlsx2binary cd ../../tools/xlsx2binary
go build go build
xlsx2binary.exe xlsx2binary.exe
cd %work_path%

View File

@ -13,3 +13,4 @@ rem echo %%b
) )
cd .. cd ..
) )
cd %work_path%

34
shell/update_deploy.bat Normal file
View File

@ -0,0 +1,34 @@
set deployDir="..\deploy"
xcopy .\data\* %deployDir%\data\ /s /e /y
xcopy .\dbproxy\dbproxy %deployDir% /y
del .\dbproxy\dbproxy
xcopy .\mgrsrv\mgrsrv %deployDir% /y
del .\mgrsrv\mgrsrv
xcopy .\gatesrv\gatesrv %deployDir% /y
del .\gatesrv\gatesrv
xcopy .\worldsrv\worldsrv %deployDir% /y
del .\worldsrv\worldsrv
xcopy .\gamesrv\gamesrv %deployDir% /y
del .\gamesrv\gamesrv
xcopy .\robot\robot %deployDir% /y
del .\robot\robot
xcopy .\ranksrv\ranksrv %deployDir% /y
del .\ranksrv\ranksrv
if exist "%deployDir%\data\gameparam.json" (del %deployDir%\data\gameparam.json)
if exist "%deployDir%\data\clientparam.json" (del %deployDir%\data\clientparam.json)
if exist "%deployDir%\data\thrconfig.json" (del %deployDir%\data\thrconfig.json)
if exist "%deployDir%\data\gamedata.json" (del %deployDir%\data\gamedata.json)
if exist "%deployDir%\data\fishingparam.json" (del %deployDir%\data\fishingparam.json)
if exist "%deployDir%\data\normalparam.json" (del %deployDir%\data\normalparam.json)
if exist "%deployDir%\data\gmac.json" (del %deployDir%\data\gmac.json)
if exist "%deployDir%\data\zone_rob.json" (del %deployDir%\data\zone_rob.json)
if exist "%deployDir%\data\icon_rob.json" (del %deployDir%\data\icon_rob.json)

View File

@ -12,4 +12,3 @@ if exist ".\public" (
git push git push
cd .. cd ..
) )

View File

@ -1,33 +1,3 @@
xcopy .\data D:\trunk\src\mongo.games.com\deploy\data /s /e /y @echo off
call shell/update_deploy.bat
xcopy .\dbproxy\dbproxy D:\trunk\src\mongo.games.com\deploy /y
del .\dbproxy\dbproxy
xcopy .\mgrsrv\mgrsrv D:\trunk\src\mongo.games.com\deploy /y
del .\mgrsrv\mgrsrv
xcopy .\gatesrv\gatesrv D:\trunk\src\mongo.games.com\deploy /y
del .\gatesrv\gatesrv
xcopy .\worldsrv\worldsrv D:\trunk\src\mongo.games.com\deploy /y
del .\worldsrv\worldsrv
xcopy .\gamesrv\gamesrv D:\trunk\src\mongo.games.com\deploy /y
del .\gamesrv\gamesrv
xcopy .\robot\robot D:\trunk\src\mongo.games.com\deploy /y
del .\robot\robot
xcopy .\ranksrv\ranksrv D:\trunk\src\mongo.games.com\deploy /y
del .\ranksrv\ranksrv
if exist "D:\trunk\src\mongo.games.com\deploy\data\gameparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\gameparam.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\clientparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\clientparam.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\thrconfig.json" (del D:\trunk\src\mongo.games.com\deploy\data\thrconfig.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\gamedata.json" (del D:\trunk\src\mongo.games.com\deploy\data\gamedata.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\fishingparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\fishingparam.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\normalparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\normalparam.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\gmac.json" (del D:\trunk\src\mongo.games.com\deploy\data\gmac.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\zone_rob.json" (del D:\trunk\src\mongo.games.com\deploy\data\zone_rob.json)
if exist "D:\trunk\src\mongo.games.com\deploy\data\icon_rob.json" (del D:\trunk\src\mongo.games.com\deploy\data\icon_rob.json)
pause pause