From a8c6bba80d9ccc0e2950c3b1a649cdc80cfbf70f Mon Sep 17 00:00:00 2001 From: Carlos de Paula Date: Thu, 30 May 2024 17:19:48 -0300 Subject: [PATCH] Fix yaml generation in build script --- scripts/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index d6c86be..9e2bfb8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -20,8 +20,10 @@ rm -rf manifests mkdir -p manifests/setup # optional, but we would like to generate yaml, not json -for file in $(find manifests -type f ! -name '*.yaml'); do - cat "$file" | $(go env GOPATH)/bin/gojsontoyaml > "$file.yaml" && rm -f "$file" +$JSONNET_BIN -J vendor -m manifests "${1-example.jsonnet}" | while IFS= read -r file; do + "$(go env GOPATH)/bin/gojsontoyaml" <"$file" >"$file.yaml" + rm -f "$file" done + # Clean-up json files from manifests dir find manifests -type f ! -name '*.yaml' -delete