diff --git a/README.md b/README.md index afc40aa3..ed9115b1 100644 --- a/README.md +++ b/README.md @@ -243,8 +243,12 @@ PATH="$(pwd)/tmp/bin:${PATH}" rm -rf manifests mkdir -p manifests/setup - # optional, but we would like to generate yaml, not json -jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {} +# Calling gojsontoyaml is optional, but we would like to generate yaml, not json +jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {} + +# Make sure to remove json files +find manifests -type f ! -name '*.yaml' -delete +rm kustomization ``` diff --git a/build.sh b/build.sh index a61af846..9f048017 100755 --- a/build.sh +++ b/build.sh @@ -14,6 +14,10 @@ PATH="$(pwd)/tmp/bin:${PATH}" rm -rf manifests mkdir -p manifests/setup - # optional, but we would like to generate yaml, not json -jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {} +# Calling gojsontoyaml is optional, but we would like to generate yaml, not json +jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {} + +# Make sure to remove json files +find manifests -type f ! -name '*.yaml' -delete +rm kustomization