Skip to content

Commit

Permalink
chore(release-workflow) yq v4 compatible (#9)
Browse files Browse the repository at this point in the history
* chore(workflow) yq v4 compatible
  • Loading branch information
jgomez-jb authored Mar 25, 2021
1 parent c7b2dd1 commit b043efb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ for chart in charts/*; do
# and output the merged YAML document as JSON.
# See https://mikefarah.gitbook.io/yq/commands/merge
# and https://mikefarah.gitbook.io/yq/usage/convert
yq merge --overwrite --tojson definitions.schema.yaml "${chart}"/values.schema.yaml > "${chart}"/values.schema.json
JSON_SCHEMA="${chart}/values.schema.json"
YAML_SCHEMA="${chart}/values.schema.yaml"
if [ ! -f "$JSON_SCHEMA" ]
then
echo "File $JSON_SCHEMA does not exist"
touch "$JSON_SCHEMA"
fi
yq eval-all --tojson "select(fileIndex == 0) * select(filename == \"$YAML_SCHEMA\")" definitions.schema.yaml "${chart}"/values.schema.yaml > "$JSON_SCHEMA"

done

echo "done"

0 comments on commit b043efb

Please sign in to comment.