2016-03-27 14:37:54 +00:00
|
|
|
#!/bin/sh
|
2016-03-28 07:57:20 +00:00
|
|
|
|
2016-04-12 07:37:53 +00:00
|
|
|
OS="darwin linux"
|
2016-03-28 07:57:20 +00:00
|
|
|
ARCH="amd64"
|
|
|
|
|
|
|
|
for GOOS in $OS; do
|
|
|
|
for GOARCH in $ARCH; do
|
2016-04-13 07:22:04 +00:00
|
|
|
EXE="gorush"
|
|
|
|
(test "$GOOS" = "windows") && EXE="gorush.exe"
|
2016-03-27 14:48:20 +00:00
|
|
|
|
|
|
|
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
|
2016-04-13 07:22:04 +00:00
|
|
|
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gorush.go;
|
|
|
|
tar -C bin/$GOOS/$GOARCH -czf bin/gorush-$GOOS-$GOARCH.tar.gz gorush
|
2016-03-27 14:37:54 +00:00
|
|
|
done
|
|
|
|
done
|