From c957262b5a942ebdafa17016a6e6b42024920a47 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 22 2016 09:06:18 +0000 Subject: If compose fails, stop running everything else If a compose fails, we don't want to run any dependency checks nor send any e-mails. Signed-off-by: Lubomír Sedlář --- 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