-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·48 lines (40 loc) · 1.08 KB
/
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
44
45
46
47
48
#!/bin/bash
#make the wegui
cd webgui/
if !(npm run build); then
printf 'Could not build webgui!'
exit 1
fi
cd ..
#make the assetFS filesystem that includes everything in the webgui/build folder into the executable
go-bindata-assetfs webgui/dist/...
GREEN='\033[0;32m'
NC='\033[0m' # No Color
#TICK='\033[0;32m \xE2\x9C\x93 \033[0m'
TICK=$GREEN'\xE2\x9C\x93'$NC
# build webgui
#cd ./webgui
#npm run build
#cd ..
# build for following architectures:
printf 'building for...\n'
printf 'Linux AMD64'
if GOOS=linux GOARCH=amd64 go build -o out/simpleAudio_linux_amd64; then
printf ' '$TICK'\n' $TICK
fi
printf 'Linux 386'
if GOOS=linux GOARCH=386 go build -o out/simpleAudio_linux_386; then
printf ' '$TICK'\n' $TICK
fi
printf 'Linux ARM'
if GOOS=linux GOARCH=arm go build -o out/simpleAudio_linux_arm; then
printf ' '$TICK'\n' $TICK
fi
printf 'Windows AMD64'
if GOOS=windows GOARCH=amd64 go build -o out/simpleAudio_win_amd64.exe; then
printf ' '$TICK'\n' $TICK
fi
printf 'Windows 386'
if GOOS=windows GOARCH=386 go build -o out/simpleAudio_win_386.exe; then
printf ' '$TICK'\n' $TICK
fi