Skip to content

Commit

Permalink
ob_gen: Fixes jq value extraction [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Nov 22, 2023
1 parent 268377b commit 82b7f71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ob_gen
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ wget \
-O "$OSH_TOOL_REPORT_JSON" \
"$OSH_TOOL_REPORT_JSON_URL"
COMPLIANCE_FACTOR_MIN="0.8"
COMPLIANCE_FACTOR="$(jq '.stats.ratings.compliance.factor' < "$OSH_TOOL_REPORT_JSON")"
COMPLIANCE_BADGE_URL=$(jq '.stats.ratings.compliance.badgeUrl' < "$OSH_TOOL_REPORT_JSON")
COMPLIANCE_FACTOR="$(jq --raw-output '.stats.ratings.compliance.factor' < "$OSH_TOOL_REPORT_JSON")"
COMPLIANCE_BADGE_URL=$(jq --raw-output '.stats.ratings.compliance.badgeUrl' < "$OSH_TOOL_REPORT_JSON")
COMPLIANCE_BADGE="$out_dir/compliance-badge-raw.svg"
wget \
--quiet \
Expand Down Expand Up @@ -174,7 +174,7 @@ EVIDENCE_2='"'"$OSH_TOOL_REPORT_HTML_URL"'"'
EVIDENCE_3='"'"$OSH_TOOL_REPORT_MD_URL"'"'
DATE_ISSUED_ON="$(date --iso-8601=seconds)"
DATE_EXPIRES="$(date --iso-8601=seconds --date="2099-12-30")"
COMPLIANCE_PERCENT="$(jq '.stats.ratings.compliance.percent' < "$OSH_TOOL_REPORT_JSON")"
COMPLIANCE_PERCENT="$(jq --raw-output '.stats.ratings.compliance.percent' < "$OSH_TOOL_REPORT_JSON")"
EOF
#EVIDENCE_4="{ \"compliance-factor\": \"$COMPLIANCE_FACTOR\" }"

Expand Down

0 comments on commit 82b7f71

Please sign in to comment.