Commit 142e458a authored by SataQiu's avatar SataQiu

fix shellcheck failures of hack/update-openapi-spec.sh

parent c09cfb71
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
./hack/update-generated-kms-dockerized.sh ./hack/update-generated-kms-dockerized.sh
./hack/update-generated-protobuf-dockerized.sh ./hack/update-generated-protobuf-dockerized.sh
./hack/update-generated-runtime-dockerized.sh ./hack/update-generated-runtime-dockerized.sh
./hack/update-openapi-spec.sh
./hack/update-vendor.sh ./hack/update-vendor.sh
./hack/verify-api-groups.sh ./hack/verify-api-groups.sh
./hack/verify-boilerplate.sh ./hack/verify-boilerplate.sh
......
...@@ -21,7 +21,7 @@ set -o errexit ...@@ -21,7 +21,7 @@ set -o errexit
set -o nounset set -o nounset
set -o pipefail set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
OPENAPI_ROOT_DIR="${KUBE_ROOT}/api/openapi-spec" OPENAPI_ROOT_DIR="${KUBE_ROOT}/api/openapi-spec"
source "${KUBE_ROOT}/hack/lib/init.sh" source "${KUBE_ROOT}/hack/lib/init.sh"
...@@ -33,8 +33,8 @@ make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver ...@@ -33,8 +33,8 @@ make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver
function cleanup() function cleanup()
{ {
if [[ -n ${APISERVER_PID-} ]]; then if [[ -n ${APISERVER_PID-} ]]; then
kill ${APISERVER_PID} 1>&2 2>/dev/null kill "${APISERVER_PID}" 1>&2 2>/dev/null
wait ${APISERVER_PID} || true wait "${APISERVER_PID}" || true
fi fi
unset APISERVER_PID unset APISERVER_PID
...@@ -56,7 +56,7 @@ API_LOGFILE=${API_LOGFILE:-/tmp/openapi-api-server.log} ...@@ -56,7 +56,7 @@ API_LOGFILE=${API_LOGFILE:-/tmp/openapi-api-server.log}
kube::etcd::start kube::etcd::start
echo "dummy_token,admin,admin" > ${TMP_DIR}/tokenauth.csv echo "dummy_token,admin,admin" > "${TMP_DIR}/tokenauth.csv"
# Start kube-apiserver # Start kube-apiserver
kube::log::status "Starting kube-apiserver" kube::log::status "Starting kube-apiserver"
...@@ -82,7 +82,7 @@ if ! kube::util::wait_for_url "${API_HOST}:${API_PORT}/healthz" "apiserver: "; t ...@@ -82,7 +82,7 @@ if ! kube::util::wait_for_url "${API_HOST}:${API_PORT}/healthz" "apiserver: "; t
exit 1 exit 1
fi fi
kube::log::status "Updating " ${OPENAPI_ROOT_DIR} kube::log::status "Updating " "${OPENAPI_ROOT_DIR}"
curl -w "\n" -fs "${API_HOST}:${API_PORT}/openapi/v2" | jq -S . > "${OPENAPI_ROOT_DIR}/swagger.json" curl -w "\n" -fs "${API_HOST}:${API_PORT}/openapi/v2" | jq -S . > "${OPENAPI_ROOT_DIR}/swagger.json"
......
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