forked from flapjack/flapjack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·32 lines (23 loc) · 1.01 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
#!/bin/bash
set -e
export GOPATH=$(pwd):$GOPATH
go get github.com/garyburd/redigo/redis
go get github.com/go-martini/martini
go get gopkg.in/alecthomas/kingpin.v1
go get github.com/oguzbilgic/pandik
mv bin/pandik libexec/httpchecker
go test flapjack
go build -x -o libexec/httpbroker libexec/httpbroker.go
go build -x -o libexec/oneoff libexec/oneoff.go
if [ ! -z "$CROSSCOMPILE" ]; then
for command in httpbroker oneoff; do
GOOS=linux GOARCH=amd64 CGOENABLED=0 go build -x -o libexec/$command.linux_amd64 libexec/$command.go
GOOS=linux GOARCH=386 CGOENABLED=0 go build -x -o libexec/$command.linux_386 libexec/$command.go
done
pushd src/github.com/oguzbilgic/pandik
GOOS=linux GOARCH=amd64 CGOENABLED=0 go build -x -o httpchecker.linux_amd64
GOOS=linux GOARCH=386 CGOENABLED=0 go build -x -o httpchecker.linux_386
popd
mv src/github.com/oguzbilgic/pandik/httpchecker.linux_amd64 libexec/httpchecker.linux_amd64
mv src/github.com/oguzbilgic/pandik/httpchecker.linux_386 libexec/httpchecker.linux_386
fi