diff options
| author | k8s-ci-robot <k8s-ci-robot@users.noreply.github.com> | 2018-03-14 15:28:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-14 15:28:05 -0700 |
| commit | 56005d414c3661d466514dfad5b6b58c2a64dc4d (patch) | |
| tree | 84d2084b47ad019ce5485e8568824ffb5e6f2a77 | |
| parent | 3cb6c7ab4bab939818a942c0c24893d8f521c7f9 (diff) | |
| parent | 973b948b6b1732135aec37084b6e0b28bb1b77ef (diff) | |
Merge pull request #1897 from cblecker/fix-gen-doc-verify
Fix up verify-generated-docs script
| -rwxr-xr-x | hack/verify-generated-docs.sh | 16 |
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 |
