From ebdd968c246e281f73133d83b0b072464b133050 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Tue, 5 Feb 2019 14:15:17 +0300 Subject: [PATCH] Fail build script if building of any target fails E.g, I had a build error of yggdrasil, but ./build returned exit code 0: + ./build -t -l -linkmode=external Building: yggdrasil github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil /home/user/go/src/github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil/multicast.go:39:9: undefined: net.ListenConfig Building: yggdrasilctl + exit 0 --- build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build b/build index 7ceb4c9..f6c7246 100755 --- a/build +++ b/build @@ -1,5 +1,7 @@ #!/bin/sh +set -ef + PKGSRC=${PKGSRC:-github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil} PKGNAME=${PKGNAME:-$(sh contrib/semver/name.sh)} PKGVER=${PKGVER:-$(sh contrib/semver/version.sh --bare)}