Skip to content

Commit d7e5925

Browse files
committed
hack/update-generated-openapi.sh: fix openapi-gen input file format
1 parent 9925997 commit d7e5925

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

hack/update-generated-openapi.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ ORIGIN_INPUT_DIRS=(
3434
KUBE_INPUT_DIRS=$(IFS=,; echo "${KUBE_INPUT_DIRS[*]}")
3535
ORIGIN_INPUT_DIRS=$(IFS=,; echo "${ORIGIN_INPUT_DIRS[*]}")
3636

37+
function join { local IFS="$1"; shift; echo "$*"; }
38+
3739
echo "Generating origin openapi"
3840
${GOPATH}/bin/openapi-gen \
3941
--build-tag=ignore_autogenerated_openshift \
4042
--output-file-base zz_generated.openapi \
4143
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \
4244
--output-base="${GOPATH}/src" \
43-
--input-dirs "${KUBE_INPUT_DIRS},${ORIGIN_INPUT_DIRS}" \
45+
--input-dirs $(join , "${KUBE_INPUT_DIRS[@]}" "${ORIGIN_INPUT_DIRS[@]}") \
4446
--output-package "${ORIGIN_PREFIX}pkg/openapi" \
4547
--report-filename "${SCRIPT_ROOT}/hack/openapi-violation.list" \
4648
"$@"
@@ -51,7 +53,7 @@ ${GOPATH}/bin/openapi-gen \
5153
--output-file-base zz_generated.openapi \
5254
--go-header-file ${SCRIPT_ROOT}/vendor/k8s.io/kubernetes/hack/boilerplate/boilerplate.generatego.txt \
5355
--output-base="${GOPATH}/src" \
54-
--input-dirs "${KUBE_INPUT_DIRS}" \
56+
--input-dirs $(join , "${KUBE_INPUT_DIRS[@]}") \
5557
--output-package "${ORIGIN_PREFIX}/vendor/k8s.io/kubernetes/pkg/generated/openapi" \
5658
--report-filename "${SCRIPT_ROOT}/vendor/k8s.io/kubernetes/hack/openapi-violation.list" \
5759
"$@"

0 commit comments

Comments
 (0)