make mungedoc exit 1 if manual changes are needed and wire up erro message.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user