Commit 53e14c7a authored by Mike Danese's avatar Mike Danese

diff all of pkg/ when verifying swagerspec instead of just pkg/api/

parent 092dddd1
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment