Skip to content

Commit

Permalink
build: Use jq instead of awk to parse the SHA when building api-docs (
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan953 authored Feb 8, 2024
1 parent 0a07399 commit f015aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/bump-api-schema-sha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
git config user.name "openapi-getsentry-bot"
filepath="src/build/resolveOpenAPI.ts"
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main')" | jq --raw-output .sha
sed -i -e "s|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = '$sha';|g" "$filepath"
branch="bot/bump-api-schema-to-${sha:0:8}"
Expand Down

0 comments on commit f015aae

Please sign in to comment.