Update build.sh

This commit is contained in:
Yesid Leonardo López Sierra 2024-03-03 00:51:34 +01:00 committed by Carlos Eduardo
parent 9bda1810a6
commit 476c00d129

View File

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