From 261d2ce423bbcf271bd15276b70222bc64ef5040 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 17 Jul 2015 12:49:22 -0700 Subject: [PATCH] Ignore whitespace when diffing generated docs --- hack/lib/util.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 8fa0fb5393..1c276e111c 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -159,8 +159,9 @@ kube::util::gen-doc() { generated=$(echo "${generated}" | grep -v "^${skipprefix}" || :) fi # By now, the contents should be normalized and stripped of any - # auto-managed content. - if [[ "${original}" == "${generated}" ]]; then + # auto-managed content. We also ignore whitespace here because of + # markdown strictness fixups later in the pipeline. + if diff -Bw <(echo "${original}") <(echo "${generated}") > /dev/null; then # actual contents same, overwrite generated with original. mv "${dest}/${file}" "${tmpdir}/${file}" fi