From 06a6623a70776675cd510b578dcc010c78993842 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 11 Jul 2015 15:57:52 -0700 Subject: [PATCH] Filter munges out during doc generation This allows us to apply content-mutating munges to generated files and nothave the verifier flag them as needing regeneration later. --- hack/lib/util.sh | 16 ++++++++++++---- hack/run-gendocs.sh | 10 +++++----- hack/verify-gendocs.sh | 4 ++-- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index f652ef7aee0..5e542d99c1a 100644 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -143,11 +143,19 @@ kube::util::gen-doc() { link=$(kube::util::analytics-link "${path}") echo -e "\n${link}" >> "${tmpdir}/${file}" fi - # remove all old generated files from the destination - if [[ -e "${tmpdir}/${file}" && -n "${skipprefix}" ]]; then + # Remove all old generated files from the destination + if [[ -e "${tmpdir}/${file}" ]]; then local original generated - original=$(grep -v "^${skipprefix}" "${dest}/${file}") || : - generated=$(grep -v "^${skipprefix}" "${tmpdir}/${file}") || : + # Filter all munges from original content. + original=$(cat "${dest}/${file}" | sed '/^