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.
This commit is contained in:
Travis Cross 2014-02-18 21:05:01 +00:00
parent edf294cdf1
commit 9a0032e9b7
1 changed files with 4 additions and 0 deletions

4
debian/util.sh vendored
View File

@ -359,6 +359,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)"
@ -372,6 +373,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
@ -384,6 +387,7 @@ build_all () {
[ -z "$modlist" ] || rm -f $modtmp
trap - EXIT
cat ../log/changes
test "$(cat ../log/builds-ok)" = true || exit 1
}
usage () {