Merge pull request #501 from dgrisonnet/fix-generate-cleanup

Fix json files cleanup when generating manifests
This commit is contained in:
Frederic Branczyk 2020-04-29 14:14:05 +02:00 committed by GitHub
commit 49ad6a67af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -243,8 +243,12 @@ PATH="$(pwd)/tmp/bin:${PATH}"
rm -rf manifests rm -rf manifests
mkdir -p manifests/setup mkdir -p manifests/setup
# optional, but we would like to generate yaml, not json # 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; rm -f {}' -- {} 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
``` ```

View File

@ -14,6 +14,10 @@ PATH="$(pwd)/tmp/bin:${PATH}"
rm -rf manifests rm -rf manifests
mkdir -p manifests/setup mkdir -p manifests/setup
# optional, but we would like to generate yaml, not json # 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; rm -f {}' -- {} 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