修改构建脚本
This commit is contained in:
parent
0f2404bf12
commit
cdd855bfb2
10
build.bat
10
build.bat
|
@ -2,15 +2,9 @@ go env -w GO111MODULE=off
|
|||
|
||||
@echo off
|
||||
|
||||
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
|
||||
call shell/build.bat
|
||||
|
||||
@echo "Wait all build task complete!"
|
||||
echo "Wait all build task complete!"
|
||||
|
||||
if %errorcode% neq 0 (
|
||||
pause
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
set CGO_ENABLED=0
|
||||
set GOOS=linux
|
||||
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.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
29
deploy.bat
29
deploy.bat
|
@ -1,34 +1,37 @@
|
|||
rem 切换到develop分支
|
||||
@echo off
|
||||
set work_path=%cd%
|
||||
git checkout develop
|
||||
|
||||
rem 生成配置文件
|
||||
call shell/gen_data.bat
|
||||
|
||||
rem 生产protocol
|
||||
call shell/gen_go.bat
|
||||
|
||||
rem 提交public
|
||||
call update_public.bat
|
||||
call shell/update_public.bat
|
||||
|
||||
rem 提交develop
|
||||
git add .
|
||||
git add public
|
||||
git commit -m "update develop"
|
||||
|
||||
rem 切换release
|
||||
git checkout release
|
||||
|
||||
rem 合并develop分支
|
||||
git merge develop
|
||||
|
||||
rem 提交release
|
||||
git add .
|
||||
git add public
|
||||
git commit -m "update release"
|
||||
|
||||
rem 编译
|
||||
call build_linux.bat
|
||||
set CGO_ENABLED=0
|
||||
set GOOS=linux
|
||||
set GOARCH=amd64
|
||||
go env -w GO111MODULE=off
|
||||
call shell/build.bat
|
||||
|
||||
rem 提交deploy仓库
|
||||
call update_deploy.bat
|
||||
rem copy
|
||||
cd %work_path%
|
||||
call shell/update_deploy.bat
|
||||
|
||||
git checkout develop
|
||||
pause
|
||||
|
||||
|
||||
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit fcb24ec4f50716936ebb587e84867835b4dba2fc
|
||||
Subproject commit 1979cd52fb471bf87bce124133da8d9996ffa3e4
|
|
@ -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
|
|
@ -11,4 +11,5 @@ cd ../../protocol/server
|
|||
|
||||
cd ../../tools/xlsx2binary
|
||||
go build
|
||||
xlsx2binary.exe
|
||||
xlsx2binary.exe
|
||||
cd %work_path%
|
|
@ -12,4 +12,5 @@ rem echo %%b
|
|||
%protoc% --proto_path=%GOPATH%\src --proto_path=. --plugin=protoc-gen-go=%protoc-gen-go-plugin-path% --go_out=%GOPATH%\src %%b
|
||||
)
|
||||
cd ..
|
||||
)
|
||||
)
|
||||
cd %work_path%
|
|
@ -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)
|
|
@ -11,5 +11,4 @@ if exist ".\public" (
|
|||
git commit -m "update"
|
||||
git push
|
||||
cd ..
|
||||
)
|
||||
|
||||
)
|
|
@ -1,33 +1,3 @@
|
|||
xcopy .\data D:\trunk\src\mongo.games.com\deploy\data /s /e /y
|
||||
|
||||
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)
|
||||
@echo off
|
||||
call shell/update_deploy.bat
|
||||
pause
|
Loading…
Reference in New Issue