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-03-27 14:48:20 +00:00
|
|
|
EXE="gopush"
|
2016-03-28 07:57:20 +00:00
|
|
|
(test "$GOOS" = "windows") && EXE="gopush.exe"
|
2016-03-27 14:48:20 +00:00
|
|
|
|
|
|
|
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
|
|
|
|
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gopush.go;
|
2016-04-12 07:37:53 +00:00
|
|
|
tar -C bin/$GOOS/$GOARCH -czf bin/gopush-$GOOS-$GOARCH.tar.gz gopush
|
2016-03-27 14:37:54 +00:00
|
|
|
done
|
|
|
|
done
|