hack/update-generated-openapi.sh: fix openapi-gen input file format
@@ -34,13 +34,15 @@ ORIGIN_INPUT_DIRS=(
KUBE_INPUT_DIRS=$(IFS=,; echo "${KUBE_INPUT_DIRS[*]}")
ORIGIN_INPUT_DIRS=$(IFS=,; echo "${ORIGIN_INPUT_DIRS[*]}")
+function join { local IFS="$1"; shift; echo "$*"; }
+
echo "Generating origin openapi"
${GOPATH}/bin/openapi-gen \
--build-tag=ignore_autogenerated_openshift \
--output-file-base zz_generated.openapi \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \
--output-base="${GOPATH}/src" \
- --input-dirs "${KUBE_INPUT_DIRS},${ORIGIN_INPUT_DIRS}" \
+ --input-dirs $(join , "${KUBE_INPUT_DIRS[@]}" "${ORIGIN_INPUT_DIRS[@]}") \
--output-package "${ORIGIN_PREFIX}pkg/openapi" \
--report-filename "${SCRIPT_ROOT}/hack/openapi-violation.list" \
"$@"
@@ -51,7 +53,7 @@ ${GOPATH}/bin/openapi-gen \
--output-file-base zz_generated.openapi \
--go-header-file ${SCRIPT_ROOT}/vendor/k8s.io/kubernetes/hack/boilerplate/boilerplate.generatego.txt \
--output-base="${GOPATH}/src" \
- --input-dirs "${KUBE_INPUT_DIRS}" \
+ --input-dirs $(join , "${KUBE_INPUT_DIRS[@]}") \
--output-package "${ORIGIN_PREFIX}/vendor/k8s.io/kubernetes/pkg/generated/openapi" \
--report-filename "${SCRIPT_ROOT}/vendor/k8s.io/kubernetes/hack/openapi-violation.list" \
"$@"
