make mungedoc exit 1 if manual changes are needed and wire up erro message.

This commit is contained in:
Mike Danese
2015-07-15 09:49:21 -07:00
parent 8f3c3108b8
commit d4d99deb97
3 changed files with 17 additions and 19 deletions

View File

@@ -45,22 +45,20 @@ kube::util::gen-doc "${genman}" "${KUBE_ROOT}" "docs/man/man1"
kube::util::gen-doc "${genbashcomp}" "${KUBE_ROOT}" "contrib/completions/bash/"
kube::util::gen-analytics "${KUBE_ROOT}"
"${mungedocs}" "--root-dir=${KUBE_ROOT}/docs/"
ret=$?
"${mungedocs}" "--root-dir=${KUBE_ROOT}/docs/" && ret=0 || ret=$?
if [[ $ret -eq 1 ]]; then
echo "${KUBE_ROOT}/docs/ requires manual changes. See preceeding errors."
exit 1
elif [[ $ret -eq 2 ]]; then
elif [[ $ret -gt 1 ]]; then
echo "Error running mungedocs."
exit 1
fi
"${mungedocs}" "--root-dir=${KUBE_ROOT}/examples/"
ret=$?
"${mungedocs}" "--root-dir=${KUBE_ROOT}/examples/" && ret=0 || ret=$?
if [[ $ret -eq 1 ]]; then
echo "${KUBE_ROOT}/examples/ requires manual changes. See preceeding errors."
exit 1
elif [[ $ret -eq 2 ]]; then
elif [[ $ret -gt 1 ]]; then
echo "Error running mungedocs."
exit 1
fi