@@ -24,7 +24,7 @@ MARKDOWNLINT_CLI2_VERSION = 0.18.1
2424DOCKER_CLI ?= docker
2525PROMTOOL_CLI ?= promtool
2626GOMPLATE_CLI ?= go tool github.com/hairyhenderson/gomplate/v4/cmd/gomplate
27- GOJSONTOYAML_CLI ?= go tool github.com/brancz/gojsontoyaml
27+ GOJQ_CLI ?= go tool github.com/itchyny/gojq/cmd/gojq
2828EMBEDMD_CLI ?= go tool github.com/campoy/embedmd
2929JSONNET_CLI ?= go tool github.com/google/go-jsonnet/cmd/jsonnet
3030JB_CLI ?= go tool github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
@@ -152,23 +152,23 @@ mixin: examples/prometheus-alerting-rules/alerts.yaml
152152
153153examples/prometheus-alerting-rules/alerts.yaml : jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/mixin.jsonnet scripts/vendor
154154 mkdir -p examples/prometheus-alerting-rules
155- ${JSONNET_CLI} -J scripts/vendor scripts/mixin.jsonnet | ${GOJSONTOYAML_CLI} > examples/prometheus-alerting-rules/alerts.yaml
155+ ${JSONNET_CLI} -J scripts/vendor scripts/mixin.jsonnet | ${GOJQ_CLI} --yaml-output > examples/prometheus-alerting-rules/alerts.yaml
156156
157157examples : examples/standard examples/autosharding examples/daemonsetsharding mixin
158158
159159examples/standard : jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/standard.jsonnet scripts/vendor
160160 mkdir -p examples/standard
161- ${JSONNET_CLI} -J scripts/vendor -m examples/standard --ext-str version=" $( VERSION) " scripts/standard.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJSONTOYAML_CLI} > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
161+ ${JSONNET_CLI} -J scripts/vendor -m examples/standard --ext-str version=" $( VERSION) " scripts/standard.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJQ_CLI} --yaml-output > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
162162 find examples -type f ! -name ' *.yaml' -delete
163163
164164examples/autosharding : jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/autosharding.jsonnet scripts/vendor
165165 mkdir -p examples/autosharding
166- ${JSONNET_CLI} -J scripts/vendor -m examples/autosharding --ext-str version=" $( VERSION) " scripts/autosharding.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJSONTOYAML_CLI} > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
166+ ${JSONNET_CLI} -J scripts/vendor -m examples/autosharding --ext-str version=" $( VERSION) " scripts/autosharding.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJQ_CLI} --yaml-output > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
167167 find examples -type f ! -name ' *.yaml' -delete
168168
169169examples/daemonsetsharding : jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/daemonsetsharding.jsonnet scripts/vendor
170170 mkdir -p examples/daemonsetsharding
171- ${JSONNET_CLI} -J scripts/vendor -m examples/daemonsetsharding --ext-str version=" $( VERSION) " scripts/daemonsetsharding.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJSONTOYAML_CLI} > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
171+ ${JSONNET_CLI} -J scripts/vendor -m examples/daemonsetsharding --ext-str version=" $( VERSION) " scripts/daemonsetsharding.jsonnet | xargs -I{} sh -c ' cat {} | ${GOJQ_CLI} --yaml-output > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
172172 find examples -type f ! -name ' *.yaml' -delete
173173
174174scripts/vendor : scripts/jsonnetfile.json scripts/jsonnetfile.lock.json
0 commit comments