修改脚本
This commit is contained in:
parent
3b364a545e
commit
0932715970
|
@ -1,7 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
call shell/build.bat
|
for /f %%i in (programs.txt) do (
|
||||||
|
start "%%i" cmd /c "build_sub.bat %%i"
|
||||||
if %errorcode% neq 0 (
|
|
||||||
pause
|
|
||||||
)
|
)
|
|
@ -2,10 +2,4 @@ set CGO_ENABLED=0
|
||||||
set GOOS=linux
|
set GOOS=linux
|
||||||
set GOARCH=amd64
|
set GOARCH=amd64
|
||||||
|
|
||||||
@echo off
|
call build.bat
|
||||||
|
|
||||||
call shell/build.bat
|
|
||||||
|
|
||||||
if %errorcode% neq 0 (
|
|
||||||
pause
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
cd %1
|
cd %1
|
||||||
echo ========= Build %1 =========
|
|
||||||
go fmt
|
go fmt
|
||||||
go vet
|
go vet
|
||||||
go build -v
|
go build -v
|
||||||
|
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
echo Build failed %1.
|
echo Build failed %1.
|
||||||
set errorcode=1
|
pause
|
||||||
)
|
)
|
||||||
cd ..
|
|
|
@ -1,6 +1,6 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
for /f "tokens=*" %%a in (shell/programs.txt) do (
|
for /f "tokens=*" %%a in (programs.txt) do (
|
||||||
if exist "%%a\*.log" del /q "%%a\*.log"
|
if exist "%%a\*.log" del /q "%%a\*.log"
|
||||||
if exist "%%a\*.log.*" del /q "%%a\*.log.*"
|
if exist "%%a\*.log.*" del /q "%%a\*.log.*"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
for /f %%i in (shell/programs.txt) do (
|
for /f %%i in (programs.txt) do (
|
||||||
taskkill /F /IM %%i.exe
|
taskkill /F /IM %%i.exe
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
36
deploy.bat
36
deploy.bat
|
@ -1,36 +0,0 @@
|
||||||
@echo off
|
|
||||||
set work_path=%cd%
|
|
||||||
git checkout develop
|
|
||||||
|
|
||||||
call shell/gen_data.bat
|
|
||||||
|
|
||||||
call shell/gen_go.bat
|
|
||||||
|
|
||||||
call shell/update_public.bat
|
|
||||||
|
|
||||||
git add .
|
|
||||||
git commit -m "update develop"
|
|
||||||
|
|
||||||
git checkout release
|
|
||||||
|
|
||||||
git merge develop
|
|
||||||
|
|
||||||
git add .
|
|
||||||
git reset public
|
|
||||||
git commit -m "update release"
|
|
||||||
|
|
||||||
set CGO_ENABLED=0
|
|
||||||
set GOOS=linux
|
|
||||||
set GOARCH=amd64
|
|
||||||
go env -w GO111MODULE=off
|
|
||||||
call shell/build.bat
|
|
||||||
|
|
||||||
rem copy
|
|
||||||
cd %work_path%
|
|
||||||
call shell/update_deploy.bat
|
|
||||||
|
|
||||||
git checkout develop
|
|
||||||
pause
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ go build
|
||||||
xlsx2proto.exe
|
xlsx2proto.exe
|
||||||
|
|
||||||
cd ../../
|
cd ../../
|
||||||
%protoc% --proto_path=./protocol/server --plugin=protoc-gen-go=%protoc-gen-go-plugin-path% --go_out=../../ pbdata.proto
|
%protoc% --proto_path=. --plugin=protoc-gen-go=%protoc-gen-go-plugin-path% --go_out=../../ protocol/server/pbdata.proto
|
||||||
|
|
||||||
cd ./tools/xlsx2binary
|
cd ./tools/xlsx2binary
|
||||||
go build
|
go build
|
||||||
|
|
|
@ -101,6 +101,7 @@ func (TagCode) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_protocol_webapi_webapi_proto_rawDescGZIP(), []int{0}
|
return file_protocol_webapi_webapi_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保持和 shop.proto 中的 OpResultCode 一样
|
||||||
type ExchangeCreateCode int32
|
type ExchangeCreateCode int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
@echo off
|
|
||||||
|
|
||||||
for /f %%i in (shell/programs.txt) do (
|
|
||||||
call shell/build_sub.bat %%i
|
|
||||||
)
|
|
||||||
|
|
||||||
echo "build complete!"
|
|
|
@ -2,7 +2,7 @@ set GODEBUG=gctrace=1
|
||||||
@echo off
|
@echo off
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
for /f "tokens=*" %%a in (shell/programs.txt) do (
|
for /f "tokens=*" %%a in (programs.txt) do (
|
||||||
set program=%%a/%%a.exe
|
set program=%%a/%%a.exe
|
||||||
|
|
||||||
if exist "!program!" (
|
if exist "!program!" (
|
||||||
|
|
|
@ -4,12 +4,12 @@ set deployDir=".\deploy"
|
||||||
|
|
||||||
xcopy .\data\* %deployDir%\data\ /s /e /y
|
xcopy .\data\* %deployDir%\data\ /s /e /y
|
||||||
|
|
||||||
for /f "tokens=*" %%a in (shell/programs.txt) do (
|
for /f "tokens=*" %%a in (programs.txt) do (
|
||||||
xcopy .\%%a\%%a %deployDir% /y
|
xcopy .\%%a\%%a %deployDir% /y
|
||||||
del .\%%a\%%a
|
del .\%%a\%%a
|
||||||
)
|
)
|
||||||
|
|
||||||
for /f "tokens=*" %%f in (shell/exclude.txt) do (
|
for /f "tokens=*" %%f in (exclude.txt) do (
|
||||||
if exist "%deployDir%\data\%%f" (del "%deployDir%\data\%%f")
|
if exist "%deployDir%\data\%%f" (del "%deployDir%\data\%%f")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue