Fix yaml generation in build script

This commit is contained in:
Carlos de Paula 2024-05-30 17:19:48 -03:00
parent 476c00d129
commit a8c6bba80d

View File

@ -20,8 +20,10 @@ rm -rf manifests
mkdir -p manifests/setup mkdir -p manifests/setup
# optional, but we would like to generate yaml, not json # optional, but we would like to generate yaml, not json
for file in $(find manifests -type f ! -name '*.yaml'); do $JSONNET_BIN -J vendor -m manifests "${1-example.jsonnet}" | while IFS= read -r file; do
cat "$file" | $(go env GOPATH)/bin/gojsontoyaml > "$file.yaml" && rm -f "$file" "$(go env GOPATH)/bin/gojsontoyaml" <"$file" >"$file.yaml"
rm -f "$file"
done done
# Clean-up json files from manifests dir # Clean-up json files from manifests dir
find manifests -type f ! -name '*.yaml' -delete find manifests -type f ! -name '*.yaml' -delete