Skip to content

Instantly share code, notes, and snippets.

@brianclogan
Last active May 11, 2022 13:36
Show Gist options
  • Save brianclogan/14c737784fd792b231c79bc4bd454bbc to your computer and use it in GitHub Desktop.
Save brianclogan/14c737784fd792b231c79bc4bd454bbc to your computer and use it in GitHub Desktop.
SENTRY WEBHOOK PUBLISH - FORGE

When using Laravel Forge with Sentry, I found that I wanted a way to, when Forge deployed a new update, alert sentry of a release.

Here is what I did.

Edit the deploy script and add:

VERSION='{"version":"'$(git log --pretty=format:'%H' -n 1)'"}'
curl {YOUR_SENTRY_URL_HERE}/ \
  -X POST \
  -H 'Content-Type: application/json' \
  -d $VERSION

This sends sentry an update saying the new version is the last git hash.

MAKE SURE TO CHANGE THE {YOUR_SENTRY_URL_HERE} with the one found under release tracking!

@fakeheal
Copy link

Here's Release Tracking:

https://sentry.io/settings/ {{ YOUR ORG }} /projects/ {{ YOUR PROJECT }} /release-tracking/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment