build.sh 1.0 KB
Newer Older
1 2 3 4
rm -rf ztf
mkdir ztf
mkdir ztf/log
cp -r conf ztf/
5
cp -r runtime ztf/
6 7
cp -r demo ztf/

8
go-bindata -o=res/res.go -pkg=res res/ res/doc res/json res/template
9

10 11 12
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o ztf/ztf-x86.exe src/ztf.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ztf/ztf-amd64.exe src/ztf.go

13 14 15 16
GO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ztf/ztf-linux src/ztf.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ztf/ztf-mac src/ztf.go

cd ztf
17

18
cp ztf-x86.exe ztf.exe
aaronchen2k2k's avatar
aaronchen2k2k 已提交
19
zip -r ztf-win-x86-2.2.zip ztf.exe conf demo runtime log -x runtime/selenium/chrome84
20 21 22
rm ztf.exe

cp ztf-amd64.exe ztf.exe
aaronchen2k2k's avatar
aaronchen2k2k 已提交
23
zip -r ztf-win-amd64-2.2.zip ztf.exe conf demo runtime -x runtime/selenium/chrome84
24
rm ztf.exe
25

26
cp ztf-linux ztf
aaronchen2k2k's avatar
aaronchen2k2k 已提交
27
tar --exclude=runtime/php --exclude=runtime/selenium/chrome84 --exclude=runtime/selenium/chrome84.exe -zcvf ztf-linux-2.2.tar.gz ztf conf demo runtime log
28
rm ztf
29

30
cp ztf-mac ztf
aaronchen2k2k's avatar
aaronchen2k2k 已提交
31
zip -r ztf-mac-2.2.zip ztf conf demo runtime log -x "runtime/php*" -x "runtime/selenium/chrome84" -x "runtime/selenium/chrome84.exe"
32
rm ztf
33

aaronchen2k2k's avatar
aaronchen2k2k 已提交
34
cd ..