-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
69 lines (43 loc) · 1.63 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
########## Windows ##########
# Build .exe for windows
GOOS=windows GOARCH=amd64 go build -o bin/xplane-gateway-downloader.exe .
# go into bin folder to avoid bin folder appearing in .zip file
cd bin/
# zip windows application
tar -cvf xplane-gateway-downloader-windows.zip xplane-gateway-downloader.exe
# get back out for next go build cmd
cd ../
########## Mac OS ##########
# Build for mac 64-bit
GOOS=darwin GOARCH=amd64 go build -o bin/xplane-gateway-downloader .
# go into bin folder to avoid bin folder appearing in .zip file
cd bin/
# zip mac 64-bit application
tar -cvf xplane-gateway-downloader-mac_os.zip xplane-gateway-downloader
# rename file
mv xplane-gateway-downloader xplane-gateway-downloader-amd64-darwin
# get back out for next go build cmd
cd ../
########## Linux 32-bit ##########
# Build for linux 32-bit
GOOS=linux GOARCH=386 go build -o bin/xplane-gateway-downloader .
# go into bin folder to avoid bin folder appearing in .zip file
cd bin/
# zip mac 64-bit application
tar -cvf xplane-gateway-downloader-linux-32bit.zip xplane-gateway-downloader
# rename file
mv xplane-gateway-downloader xplane-gateway-downloader-386-linux
# get back out for next go build cmd
cd ../
########## Linux 64-bit ##########
# Build for linux 64-bit
GOOS=linux GOARCH=amd64 go build -o bin/xplane-gateway-downloader .
# go into bin folder to avoid bin folder appearing in .zip file
cd bin/
# zip mac 64-bit application
tar -cvf xplane-gateway-downloader-linux-64bit.zip xplane-gateway-downloader
# rename file
mv xplane-gateway-downloader xplane-gateway-downloader-amd64-linux
# get back out for next go build cmd
cd ../