From c957262b5a942ebdafa17016a6e6b42024920a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 12 Aug 2016 09:50:17 +0200 Subject: [PATCH] If compose fails, stop running everything else MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a compose fails, we don't want to run any dependency checks nor send any e-mails. Signed-off-by: Lubomír Sedlář --- nightly.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nightly.sh b/nightly.sh index 26b8389..1d9f4e4 100755 --- a/nightly.sh +++ b/nightly.sh @@ -64,8 +64,8 @@ else fi time $CMD "$@" -if [ "$?" = "0" ]; then - export mail=0 +if [ "$?" != "0" ]; then + exit 1 fi NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora-Rawhide/COMPOSE_ID) @@ -116,12 +116,10 @@ send_fedmsg "${fedmsg_json_done}" ${DIST} complete # Tell everyone by email about the compose SUBJECT='Fedora '$DIST' compose report: '$SHORTCOMPOSE_ID' changes' -if [ "$mail" = "0" ]; then - for tomail in $TOMAIL ; do - cat $TARGET_DIR/$NEWCOMPOSE_ID/logs/*verbose $DESTDIR/logs/depcheck | \ - mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail - done -fi +for tomail in $TOMAIL ; do + cat $TARGET_DIR/$NEWCOMPOSE_ID/logs/*verbose $DESTDIR/logs/depcheck | \ + mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail +done for koji in arm ppc s390 do