-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.sh
45 lines (38 loc) · 1.25 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
#!/bin/bash
VER=$1
GOOS=linux GOARCH=386 go build -o bin/mosesacs mosesacs.go
cd bin
tar cvfz mosesacs_${VER}_linux_i386.tar.gz mosesacs
rm mosesacs
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_linux_i386.tar.gz s3://mosesacs/
cd ..
GOOS=linux GOARCH=amd64 go build -o bin/mosesacs mosesacs.go
cd bin
tar cvfz mosesacs_${VER}_linux_amd64.tar.gz mosesacs
rm mosesacs
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_linux_amd64.tar.gz s3://mosesacs/
cd ..
GOOS=linux GOARCH=arm go build -o bin/mosesacs mosesacs.go
cd bin
tar cvfz mosesacs_${VER}_arm.tar.gz mosesacs
rm mosesacs
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_arm.tar.gz s3://mosesacs/
cd ..
GOOS=darwin GOARCH=amd64 go build -o bin/mosesacs mosesacs.go
cd bin
tar cvfz mosesacs_${VER}_osx_amd64.tar.gz mosesacs
rm mosesacs
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_osx_amd64.tar.gz s3://mosesacs/
cd ..
GOOS=windows GOARCH=386 go build -o bin/mosesacs.exe mosesacs.go
cd bin
zip mosesacs_${VER}_win_i386.zip mosesacs.exe
rm mosesacs.exe
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_win_i386.zip s3://mosesacs/
cd ..
GOOS=windows GOARCH=amd64 go build -o bin/mosesacs.exe mosesacs.go
cd bin
zip mosesacs_${VER}_win_amd64.zip mosesacs.exe
rm mosesacs.exe
s3cmd -c ~/.s3cfg -P put mosesacs_${VER}_win_amd64.zip s3://mosesacs/
cd ..