diff --git a/ghost/portal/.env b/ghost/portal/.env index e69de29bb2..0454adfc4a 100644 --- a/ghost/portal/.env +++ b/ghost/portal/.env @@ -0,0 +1 @@ +REACT_APP_VERSION=$npm_package_version diff --git a/ghost/portal/src/App.js b/ghost/portal/src/App.js index 6616d17377..5a491282d5 100644 --- a/ghost/portal/src/App.js +++ b/ghost/portal/src/App.js @@ -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/ ]