mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #35841 from mbohlool/o2
Automatic merge from submit-queue Update verify-openapi-spec script to check for extra generated spec hack/verify-openapi-spec.sh only check for existing spec changes. If for some reason (here most probably I forgot to delete a file in api/openapi-spec folder in #35388 after a rebase) there is an old spec exists in the spec folder, it won't panic but it should. This resulted in an unused out of date v1.spec file in the api/openapi-spec folder that this PR also removes.
This commit is contained in:
commit
46dc7e5244
16249
api/openapi-spec/v1.json
16249
api/openapi-spec/v1.json
File diff suppressed because it is too large
Load Diff
@ -32,14 +32,15 @@ TMP_SPECROOT="${KUBE_ROOT}/_tmp/openapi-spec"
|
|||||||
_tmp="${KUBE_ROOT}/_tmp"
|
_tmp="${KUBE_ROOT}/_tmp"
|
||||||
|
|
||||||
mkdir -p "${_tmp}"
|
mkdir -p "${_tmp}"
|
||||||
trap "rm -rf ${_tmp}" EXIT SIGINT
|
|
||||||
cp -a "${SPECROOT}" "${TMP_SPECROOT}"
|
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"
|
"${KUBE_ROOT}/hack/update-openapi-spec.sh"
|
||||||
echo "diffing ${SPECROOT} against freshly generated openapi spec"
|
echo "diffing ${SPECROOT} against freshly generated openapi spec"
|
||||||
ret=0
|
ret=0
|
||||||
diff -Naupr -I 'Auto generated by' "${SPECROOT}" "${TMP_SPECROOT}" || ret=$?
|
diff -Naupr -I 'Auto generated by' "${SPECROOT}" "${TMP_SPECROOT}" || ret=$?
|
||||||
cp -a ${TMP_SPECROOT} "${KUBE_ROOT}/api"
|
|
||||||
if [[ $ret -eq 0 ]]
|
if [[ $ret -eq 0 ]]
|
||||||
then
|
then
|
||||||
echo "${SPECROOT} up to date."
|
echo "${SPECROOT} up to date."
|
||||||
|
Loading…
Reference in New Issue
Block a user