Commit 261d2ce4 authored by Tim Hockin's avatar Tim Hockin

Ignore whitespace when diffing generated docs

parent 542ac8db
...@@ -159,8 +159,9 @@ kube::util::gen-doc() { ...@@ -159,8 +159,9 @@ kube::util::gen-doc() {
generated=$(echo "${generated}" | grep -v "^${skipprefix}" || :) generated=$(echo "${generated}" | grep -v "^${skipprefix}" || :)
fi fi
# By now, the contents should be normalized and stripped of any # By now, the contents should be normalized and stripped of any
# auto-managed content. # auto-managed content. We also ignore whitespace here because of
if [[ "${original}" == "${generated}" ]]; then # markdown strictness fixups later in the pipeline.
if diff -Bw <(echo "${original}") <(echo "${generated}") > /dev/null; then
# actual contents same, overwrite generated with original. # actual contents same, overwrite generated with original.
mv "${dest}/${file}" "${tmpdir}/${file}" mv "${dest}/${file}" "${tmpdir}/${file}"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment