Update verify scripts to clean up even on failures

This commit is contained in:
Jeff Grafton
2016-06-15 18:42:31 -07:00
committed by Mike Danese
parent 3ba5816e46
commit e880dbfd25
4 changed files with 10 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ TMP_DIFFROOT="${KUBE_ROOT}/_tmp/pkg"
_tmp="${KUBE_ROOT}/_tmp"
mkdir -p "${_tmp}"
trap "rm -rf ${_tmp}" EXIT SIGINT
cp -a "${DIFFROOT}" "${TMP_DIFFROOT}"
"${KUBE_ROOT}/hack/update-generated-swagger-docs.sh"
@@ -50,7 +51,6 @@ echo "diffing ${DIFFROOT} against freshly generated swagger type documentation"
ret=0
diff -Naupr -I 'Auto generated by' "${DIFFROOT}" "${TMP_DIFFROOT}" || ret=$?
cp -a "${TMP_DIFFROOT}" "${KUBE_ROOT}/"
rm -rf "${_tmp}"
if [[ $ret -eq 0 ]]
then
echo "${DIFFROOT} up to date."