-
Notifications
You must be signed in to change notification settings - Fork 50
chore: add release discovery #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🚀
| "SENTRY_RELEASE", | ||
| "SOURCE_VERSION", // Heroku #1 https://devcenter.heroku.com/changelog-items/630 | ||
| "HEROKU_SLUG_COMMIT", // Heroku #2: https://docs.sentry.io/product/integrations/deployment/heroku/#configure-releases | ||
| "CODEBUILD_RESOLVED_SOURCE_VERSION", // AWS CodeBuild: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html | ||
| "CIRCLE_SHA1", // CircleCI: https://circleci.com/docs/2.0/env-vars/ | ||
| "VERCEL_GIT_COMMIT_SHA", // Vercel docs: https://vercel.com/docs/concepts/projects/environment-variables#system-environment-variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the order matter here? If yes, is the order correct?
(Looking at it again, I think it doesn't but I'm not sure about Heroku...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question! It does. This is why SENTRY_RELEASE is on the top of the list, everything else is carrying equal weight. I was thinking to extract SENTRY_RELEASE from the rest of the pack but found it to be overkill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. Makes sense! Then, let's make sure to add a comment that SENTRY_RELEASE should be the first item in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
relates: #20
This behaviour tries to replicate the behaviour of release option of sentry-webpack-plugin.
Release name can be specified via process.env.SENTRY_RELEASE. Otherwise, it will automatically detects values for Heroku, AWS CodeBuild, CircleCI and Vercel. Otherwise uses HEAD's commit SHA. (For HEAD option, requires access to git CLI and for the root directory to be a valid repository).
Logic taken from sentry-cli here