forked from vzex/dog-tunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·34 lines (33 loc) · 1.05 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
version=$1
if [ $# -eq 0 ]
then
echo "Please input version, like \"./release.sh 0.60\""
exit
fi
rm -f dtunnel_*$1.tgz
echo "Build ReleaseFile for version $version"
echo "build linux_amd64"
GOOS=linux GOARCH=amd64 make
tar zcvf dtunnel_linux_x64_$1.tgz dtunnel dtunnel_s
echo "build linux_386"
GOOS=linux GOARCH=386 make
tar zcvf dtunnel_linux_x86_$1.tgz dtunnel dtunnel_s
echo "build mac_x64"
GOOS=darwin GOARCH=amd64 make
tar zcvf dtunnel_mac_x64_$1.tgz dtunnel dtunnel_s
echo "build win32"
GOOS=windows GOARCH=386 make && mv dtunnel dtunnel.exe && mv dtunnel_s dtunnel_s.exe
tar zcvf dtunnel_win32_$1.tgz dtunnel.exe dtunnel_s.exe
echo "build linux_arm"
GOOS=linux GOARCH=arm make
tar zcvf dtunnel_linux_arm_$1.tgz dtunnel dtunnel_s
echo "build linux_mips"
GOOS=linux GOARCH=mips make
tar zcvf dtunnel_linux_mips_$1.tgz dtunnel dtunnel_s
echo "build linux_mipsle"
GOOS=linux GOARCH=mipsle make
tar zcvf dtunnel_linux_mipsle_$1.tgz dtunnel dtunnel_s
rm -f dtunnel dtunnel.exe dtunnel_s dtunnel_s.exe
echo "Build Over"
ls -l dtunnel_*$1.tgz