From cbf7b6a318cfe5b2f8b12d050c65e2f8039412c2 Mon Sep 17 00:00:00 2001 From: Lukas Frank Date: Tue, 29 Oct 2024 13:42:38 +0100 Subject: [PATCH] fix codegen on macos --- hack/update-codegen.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 9f4edfe49..09e9d1408 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -81,11 +81,18 @@ for GV in ${ALL_VERSION_GROUPS}; do applyconfigurationgen_external_apis+=("${THIS_PKG}/api/${G}/${V}:${THIS_PKG}/client-go/applyconfigurations/${G}/${V}") done applyconfigurationgen_external_apis_csv=$(IFS=,; echo "${applyconfigurationgen_external_apis[*]}") + + +# Do not rely on process substitution / GNU bash +tmp_schema_file=$(mktemp) +trap 'rm -f "$tmp_schema_file"' EXIT +"$MODELS_SCHEMA" --openapi-package "${THIS_PKG}/client-go/openapi" --openapi-title "ironcore" > "$tmp_schema_file" + kube::codegen::gen_client \ --with-applyconfig \ --applyconfig-name "applyconfigurations" \ --applyconfig-externals "${applyconfigurationgen_external_apis_csv}" \ - --applyconfig-openapi-schema <("$MODELS_SCHEMA" --openapi-package "${THIS_PKG}/client-go/openapi" --openapi-title "ironcore") \ + --applyconfig-openapi-schema "$tmp_schema_file" \ --clientset-name "ironcore" \ --listers-name "listers" \ --informers-name "informers" \