-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
43 lines (29 loc) · 925 Bytes
/
build.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
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
set -e
set -o noglob
###########################################
export CGO_ENABLED=0
export GO111MODULE=on
build() {
echo building for $1/$2
out=build/tdp-aiart-$1-$2$3
GOOS=$1 GOARCH=$2 go build -ldflags="-s -w" -o $out main.go
}
####################################################################
releases_url=https://api.github.com/repos/opentdp/tdp-aiart-ui/releases/latest
download_url=`wget -qO- $releases_url | grep releases/download | cut -f4 -d "\""`
wget -O aiart-ui.tar.gz $download_url
tar xvf aiart-ui.tar.gz --strip-components 2 -C front
####################################################################
build android arm64
build darwin amd64
build darwin arm64
build linux amd64
build linux arm64
build windows amd64 .exe
build windows arm64 .exe
####################################################################
for app in `ls build`; do
gzip build/$app
done