diff --git a/next.config.js b/next.config.js index b71b8fb29..bab80edcc 100644 --- a/next.config.js +++ b/next.config.js @@ -5,16 +5,21 @@ const withWorkbox = require('next-with-workbox'); const { withSentryConfig } = require('@sentry/nextjs'); +const cp = require('child_process'); +const gitSha = cp.execSync('git rev-parse --short HEAD', { + cwd: __dirname, + encoding: 'utf8', +}); module.exports = withSentryConfig(withWorkbox(withBundleAnalyzer({ future: { webpack5: true, }, env: { - SENTRY_RELEASE: process.env.npm_package_version, + SENTRY_RELEASE: gitSha, }, workbox: { swSrc: 'src/serviceWorker.js', exclude: ['/manifest.json'], }, -})), { release: process.env.npm_package_version }); +})), { release: gitSha });