From f7d5eba2ea74f4e6d17ab1f93505e6f7da7b9aeb Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Tue, 18 Feb 2014 21:05:01 +0000 Subject: [PATCH] Exit non-zero from build-all on any build failure ./debian/util.sh build-all will do a number of builds in sequence or parallel. We now track if any of those builds fail to return a .changes file and exit non-zero. --- debian/util.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/util.sh b/debian/util.sh index b81181fe77..44d64962e8 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -358,6 +358,7 @@ build_all () { echo; echo; echo; echo trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT if [ "${orig:0:2}" = ".." ]; then + echo "true" > ../log/builds-ok for distro in $distros; do echo "Creating $distro dsc..." >&2 local dsc="$(create_dsc $dsc_opts $distro $orig 2>../log/$distro | tail -n1)" @@ -371,6 +372,8 @@ build_all () { echo "Done building $distro-$arch debs." >&2 if [ "${changes:0:2}" = ".." ]; then echo "$changes" >> ../log/changes + else + echo "false" > ../log/builds-ok fi } & $par || wait @@ -383,6 +386,7 @@ build_all () { [ -z "$modlist" ] || rm -f $modtmp trap - EXIT cat ../log/changes + test "$(cat ../log/builds-ok)" = true || exit 1 } usage () {