Build should fail if a platform does not build

This commit is contained in:
Jakob Borg 2014-08-13 22:27:16 +02:00
parent 213acaee3b
commit d977f4278e

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
export COPYFILE_DISABLE=true export COPYFILE_DISABLE=true
export GO386=387 # Don't use SSE on 32 bit builds export GO386=387 # Don't use SSE on 32 bit builds
@ -109,7 +111,7 @@ transifex() {
build-all() { build-all() {
rm -f *.tar.gz *.zip rm -f *.tar.gz *.zip
test -short || exit 1 test -short
assets assets
rm -rf bin Godeps/_workspace/pkg $GOPATH/pkg/*/github.com/syncthing rm -rf bin Godeps/_workspace/pkg $GOPATH/pkg/*/github.com/syncthing
@ -153,9 +155,11 @@ build-all() {
tarDist "syncthing-linux-armv5-$version" tarDist "syncthing-linux-armv5-$version"
} }
case "$1" in case "${1:-default}" in
"") default)
if [[ $# -gt 1 ]] ; then
shift shift
fi
export GOBIN=$(pwd)/bin export GOBIN=$(pwd)/bin
godep go install $* -ldflags "$ldflags" ./cmd/... godep go install $* -ldflags "$ldflags" ./cmd/...
;; ;;
@ -188,7 +192,7 @@ case "$1" in
tar) tar)
rm -f *.tar.gz *.zip rm -f *.tar.gz *.zip
test -short || exit 1 test -short
assets assets
build build
@ -233,6 +237,6 @@ case "$1" in
;; ;;
*) *)
echo "Unknown build parameter $1" echo "Unknown build command $1"
;; ;;
esac esac