hack/verify-all.sh: return error on error

pull/6/head
Eric Paris 2015-09-23 16:37:22 -04:00
parent 1ef9e05341
commit 2e814b3b79
1 changed files with 16 additions and 4 deletions

View File

@ -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