This is a simple Heroku buildpack used to uploads JavaScript sourcemaps to Sentry, as described in the Sentry docs.
Several environment variables are needed:
SOURCEMAP_DIR
: the folder (relative to the app root) where the sourcemaps can be foundSOURCEMAP_SENTRY_TOKEN
: an authentication token for the Sentry API. You can get it on the API page. The token needs theproject:write
scope.SOURCEMAP_SENTRY_PROJECT
: the organization and project slugs for you Sentry project. If your project is avaiable athttps://sentry.io/myorg/pyproject
, then this variable should bemyorg/myproect
.SOURCEMAP_URL_PREFIX
: the prefix to prepend to each sourcemap. Can be a full URL (https://example.com/dist/js/
) or a tilde-based prefix (~/dist/js/
, see the documentation for details). Make sure to include the final slash if it's needed.
Then add this buildpack to your app:
heroku buildpacks:add https://github.com/Schnouki/buildpack-sentry-sourcemaps
And push a new relase.
The buildpack will use the current git commit number (environment variable
$SOURCE_VERSION
) as the Sentry release. Make sure to add that in your app as
well!
MIT.