Skip to content

Instantly share code, notes, and snippets.

@DavidWells
Created October 16, 2021 06:27
Show Gist options
  • Select an option

  • Save DavidWells/820f67d77473c4dda5637f42004d4efc to your computer and use it in GitHub Desktop.

Select an option

Save DavidWells/820f67d77473c4dda5637f42004d4efc to your computer and use it in GitHub Desktop.
Get Latest repo SHA in bash
# via https://github.com/getsentry/sentry-docs/blob/ee13e55eac4a0fa946a6c16b43d302ff18552556/scripts/bump-version.sh
LATEST_SHA="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')";
echo $LATEST_SHA;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment