From 034652b29040d05311d474f167998f2dae4e1511 Mon Sep 17 00:00:00 2001 From: mbohlool Date: Fri, 28 Oct 2016 17:02:10 -0700 Subject: [PATCH] verify-openapi-spec.sh should not ignore extra file in the spec folder api/openapi-spec --- hack/verify-openapi-spec.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/verify-openapi-spec.sh b/hack/verify-openapi-spec.sh index 1c45d19addc..ac56cea1095 100755 --- a/hack/verify-openapi-spec.sh +++ b/hack/verify-openapi-spec.sh @@ -32,14 +32,15 @@ TMP_SPECROOT="${KUBE_ROOT}/_tmp/openapi-spec" _tmp="${KUBE_ROOT}/_tmp" mkdir -p "${_tmp}" -trap "rm -rf ${_tmp}" EXIT SIGINT cp -a "${SPECROOT}" "${TMP_SPECROOT}" +trap "cp -a ${TMP_SPECROOT} ${SPECROOT}/..; rm -rf ${_tmp}" EXIT SIGINT +rm ${SPECROOT}/* +cp ${TMP_SPECROOT}/BUILD ${SPECROOT}/BUILD "${KUBE_ROOT}/hack/update-openapi-spec.sh" echo "diffing ${SPECROOT} against freshly generated openapi spec" ret=0 diff -Naupr -I 'Auto generated by' "${SPECROOT}" "${TMP_SPECROOT}" || ret=$? -cp -a ${TMP_SPECROOT} "${KUBE_ROOT}/api" if [[ $ret -eq 0 ]] then echo "${SPECROOT} up to date."