Skip to content

Commit

Permalink
ci: refactor JSON export jq command
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Howard <[email protected]>
  • Loading branch information
jhoward-lm committed Nov 16, 2024
1 parent 31a8512 commit 9782317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function export_db_json {

[[ -z $rows ]] && rows="[]"

table_dump=$(echo "${json_dump}" | jq --argjson rows "${rows}" --arg table "${table}" '. += {$table: $rows}')
json_dump=$table_dump
table_dump=$(printf '{"%s": %s}' "$table" "$rows")
json_dump=$(jq --null-input "${json_dump} + ${table_dump}")
done

echo "${json_dump}" > bomctl-export.json
Expand Down

0 comments on commit 9782317

Please sign in to comment.