build.sh 769 字节
Newer Older
1 2 3 4 5 6 7 8
rm -rf ztf
mkdir ztf
mkdir ztf/log
cp -r conf ztf/
cp -r demo ztf/

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

9 10 11
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

12 13 14 15
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
16

17 18 19 20 21 22 23
cp ztf-x86.exe ztf.exe
zip -r ztf-win-x86-2.1.zip ztf.exe demo conf log
rm ztf.exe

cp ztf-amd64.exe ztf.exe
zip -r ztf-win-amd64-2.1.zip ztf.exe demo conf log
rm ztf.exe
24

25
cp ztf-linux ztf
26
tar -zcvf ztf-linux-2.1.tar.gz ztf demo conf log
27
rm ztf
28

29
cp ztf-mac ztf
30
zip -r ztf-mac-2.1.zip ztf demo conf log
31
rm ztf
32

33
cd ..