summaryrefslogtreecommitdiff
path: root/hack/verify-generated-docs.sh
diff options
context:
space:
mode:
authorChristoph Blecker <admin@toph.ca>2018-03-05 14:25:17 -0800
committerChristoph Blecker <admin@toph.ca>2018-03-05 14:25:17 -0800
commit973b948b6b1732135aec37084b6e0b28bb1b77ef (patch)
tree854026f851f98fcab169941bff95e6e685aee359 /hack/verify-generated-docs.sh
parent64e708da7c6215d37c3b467a5d95b50748295672 (diff)
Fix up verify-generated-docs script
Diffstat (limited to 'hack/verify-generated-docs.sh')
-rwxr-xr-xhack/verify-generated-docs.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/hack/verify-generated-docs.sh b/hack/verify-generated-docs.sh
index 4c52a1b2..6c05a1f4 100755
--- a/hack/verify-generated-docs.sh
+++ b/hack/verify-generated-docs.sh
@@ -20,18 +20,18 @@ set -o pipefail
CRT_DIR=$(pwd)
VERIFY_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t k8s-community.XXXXXX)
-WORKING_DIR=${VERIFY_TEMP}/src/testgendocs
-GOPATH=${VERIFY_TEMP}
-mkdir -p ${WORKING_DIR}
+WORKING_DIR="${VERIFY_TEMP}/src/testgendocs"
+GOPATH="${VERIFY_TEMP}"
+mkdir -p "${WORKING_DIR}"
function cleanup {
rm -rf "${VERIFY_TEMP}"
}
trap cleanup EXIT
-cp -r sigs.yaml sig-* wg-* Makefile generator vendor ${WORKING_DIR}/
+git archive --format=tar "$(git write-tree)" | (cd "${WORKING_DIR}" && tar xf -)
-cd ${WORKING_DIR}
+cd "${WORKING_DIR}"
make 1>/dev/null
mismatches=0
@@ -45,9 +45,9 @@ for file in $(ls ${CRT_DIR}/sig-*/README.md ${CRT_DIR}/wg-*/README.md ${CRT_DIR}
fi;
done
-if [ ${mismatches} -gt "0" ]; then
+if [[ ${mismatches} -gt "0" ]]; then
echo ""
- echo ${break}
+ echo "${break}"
noun="mismatch was"
if [ ${mismatches} -gt "0" ]; then
noun="mismatches were"
@@ -55,7 +55,7 @@ if [ ${mismatches} -gt "0" ]; then
echo "${mismatches} ${noun} detected."
echo "Do not manually edit sig-list.md or README.md files inside the sig folders."
echo "Instead make your changes to sigs.yaml and then run \`make\`.";
- echo ${break}
+ echo "${break}"
exit 1;
fi