set release version with gitsha
This commit is contained in:
parent
c2dfdf221c
commit
526a6b8891
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue