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