From 29441188b59b86236547f59bc7a50aaa7819f9ec Mon Sep 17 00:00:00 2001 From: Lukas Frank Date: Wed, 30 Oct 2024 15:22:21 +0100 Subject: [PATCH] Do not use process substitution in `hack/update-codegen.sh` (#1146) --- hack/update-codegen.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 9f4edfe49..d648de66f 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -81,11 +81,17 @@ 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" \