mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-11-01 08:31:02 +01:00
Merge pull request #501 from dgrisonnet/fix-generate-cleanup
Fix json files cleanup when generating manifests
This commit is contained in:
commit
49ad6a67af
@ -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
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
8
build.sh
8
build.sh
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user