From 2e814b3b79a77358bd7a25040752a664bdd15b9b Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Wed, 23 Sep 2015 16:37:22 -0400 Subject: [PATCH] hack/verify-all.sh: return error on error --- hack/verify-all.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hack/verify-all.sh b/hack/verify-all.sh index 690291effcb..6d2425a1316 100755 --- a/hack/verify-all.sh +++ b/hack/verify-all.sh @@ -53,6 +53,7 @@ fi EXCLUDE="verify-godeps.sh" +ret=0 for t in `ls $KUBE_ROOT/hack/verify-*.sh` do if is-excluded $t ; then @@ -61,9 +62,14 @@ do fi if $SILENT ; then echo -e "Verifying $t" - bash "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" + if bash "$t" &> /dev/null; then + echo -e "${color_green}SUCCESS${color_norm}" + else + echo -e "${color_red}FAILED${color_norm}" + ret=1 + fi else - bash "$t" || true + bash "$t" || ret=1 fi done @@ -75,10 +81,16 @@ do fi if $SILENT ; then echo -e "Verifying $t" - python "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" + if python "$t" &> /dev/null; then + echo -e "${color_green}SUCCESS${color_norm}" + else + echo -e "${color_red}FAILED${color_norm}" + ret=1 + fi else - python "$t" || true + python "$t" || ret=1 fi done +exit $ret # ex: ts=2 sw=2 et filetype=sh