Skip to content

Commit

Permalink
set-chart-fields: initialize missing entries
Browse files Browse the repository at this point in the history
  • Loading branch information
smatting committed Jan 23, 2024
1 parent b9ea428 commit c8c521a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/set-chart-fields
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ args=( "${@:2}" )
build_json=$(</dev/stdin)
a="$build_json"

has_chart=$(jq -Mr ".helmCharts[\"$CHART_NAME\"] != null" <<< "$a")
if [ "$has_chart" == "false" ]; then
a=$(jq -Mr ".helmCharts[\"$CHART_NAME\"] = { repo: null, version: null }" <<< "$a")
fi

meta_args=()
for x in "${args[@]}"; do
if [[ $x = meta.* ]]; then
Expand Down

0 comments on commit c8c521a

Please sign in to comment.