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.
This commit is contained in:
James Salter 2021-10-22 15:06:14 +01:00 committed by GitHub
parent 004e8edcb2
commit f550d63198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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.

View file

@ -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: {