From f550d63198eec275f798080334e3c944a8d65ccd Mon Sep 17 00:00:00 2001 From: James Salter Date: Fri, 22 Oct 2021 15:06:14 +0100 Subject: [PATCH] Pass our VERSION to sentry plugin's release arg via env (#19474) Use our existing VERSION, deduced by the packaging script, as the release for sentry sourcemaps. This will be undefined for dev builds. --- scripts/package.sh | 2 +- webpack.config.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/package.sh b/scripts/package.sh index 3960208e28..b7c27755d9 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -9,7 +9,7 @@ else fi yarn clean -yarn build +VERSION=$version yarn build # include the sample config in the tarball. Arguably this should be done by # `yarn build`, but it's just too painful. diff --git a/webpack.config.js b/webpack.config.js index c26dc1032c..27d32f7fa3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -532,9 +532,10 @@ module.exports = (env, argv) => { // upload to sentry if sentry env is present process.env.SENTRY_DSN && new SentryCliPlugin({ - release: process.env.RELEASE, + release: process.env.VERSION, include: "./webapp", }), + new webpack.EnvironmentPlugin(['VERSION']), ].filter(Boolean), output: {