0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Updated Sentry release tag to include full version

no refs

Updates sentry release tag to include full Portal version from env variable
This commit is contained in:
Rishabh 2021-06-25 09:42:06 +05:30
parent f8d6e78de7
commit 4ae361f99a
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1 @@
REACT_APP_VERSION=$npm_package_version

View file

@ -378,11 +378,13 @@ export default class App extends React.Component {
/** Setup Sentry */
setupSentry({site}) {
const {portal_sentry: portalSentry, portal_version: portalVersion, version: ghostVersion} = site;
const appVersion = process.env.REACT_APP_VERSION || portalVersion;
const releaseTag = `portal@${appVersion}|ghost@${ghostVersion}`;
if (portalSentry && portalSentry.dsn) {
Sentry.init({
dsn: portalSentry.dsn,
environment: portalSentry.env || 'development',
release: `portal@${portalVersion}|ghost@${ghostVersion}`,
release: releaseTag,
allowUrls: [
/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/
]