Skip to content

Commit

Permalink
diff all of pkg/ when verifying swagerspec instead of just pkg/api/
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedanese committed Oct 7, 2015
1 parent 092dddd commit 53e14c7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hack/after-build/verify-generated-swagger-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ if [[ ! -x "$genswaggertypedocs" ]]; then
exit 1
fi

APIROOT="${KUBE_ROOT}/pkg/api"
TMP_APIROOT="${KUBE_ROOT}/_tmp/api"
DIFFROOT="${KUBE_ROOT}/pkg"
TMP_DIFFROOT="${KUBE_ROOT}/_tmp/pkg"
_tmp="${KUBE_ROOT}/_tmp"

mkdir -p "${_tmp}"
cp -a "${APIROOT}" "${TMP_APIROOT}"
cp -a "${DIFFROOT}" "${TMP_DIFFROOT}"

"${KUBE_ROOT}/hack/update-generated-swagger-docs.sh"
echo "diffing ${APIROOT} against freshly generated swagger type documentation"
echo "diffing ${DIFFROOT} against freshly generated swagger type documentation"
ret=0
diff -Naupr -I 'Auto generated by' "${APIROOT}" "${TMP_APIROOT}" || ret=$?
cp -a "${TMP_APIROOT}" "${KUBE_ROOT}/pkg"
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 "${APIROOT} up to date."
echo "${DIFFROOT} up to date."
else
echo "${APIROOT} is out of date. Please run hack/update-generated-swagger-docs.sh"
echo "${DIFFROOT} is out of date. Please run hack/update-generated-swagger-docs.sh"
exit 1
fi

0 comments on commit 53e14c7

Please sign in to comment.