mirror of https://github.com/k3s-io/k3s
verify-generated-docs: Use exit code rather than comparison to empty string
Checking the exit code rather than the empty string has the advantage that you can identify what was found (comparison consumes the string, so it's not printed). It makes debugging much easier when something is wrong.pull/8/head
parent
df1d9b9e98
commit
fe0aa25c14
|
@ -36,7 +36,7 @@ kube::util::ensure-temp-dir
|
||||||
kube::util::gen-docs "${KUBE_TEMP}"
|
kube::util::gen-docs "${KUBE_TEMP}"
|
||||||
|
|
||||||
# Verify the list matches the expected list (diff should be empty)
|
# Verify the list matches the expected list (diff should be empty)
|
||||||
if [[ "$(diff ${KUBE_ROOT}/docs/.generated_docs ${KUBE_TEMP}/docs/.generated_docs)" != "" ]]; then
|
if ! diff "${KUBE_ROOT}/docs/.generated_docs" "${KUBE_TEMP}/docs/.generated_docs"; then
|
||||||
echo "List of generated docs doesn't match a freshly built list. Please run hack/update-generated-docs.sh"
|
echo "List of generated docs doesn't match a freshly built list. Please run hack/update-generated-docs.sh"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue