set release version with gitsha

This commit is contained in:
Abhinav-grd 2021-06-15 14:37:32 +05:30
parent c2dfdf221c
commit 526a6b8891

View file

@ -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 });