fix: remove redundant env settings from explorer (#732)
* fix: remove redundant env settings from explorer * fix: format
This commit is contained in:
parent
86310d7bb1
commit
d1c4924d66
@ -1,13 +1,5 @@
|
||||
const { execSync } = require('child_process');
|
||||
const webpack = require('webpack');
|
||||
const SentryPlugin = require('@sentry/webpack-plugin');
|
||||
|
||||
const gitCommitHash = execSync('git rev-parse HEAD').toString();
|
||||
const gitOriginUrl = execSync('git remote get-url origin')
|
||||
.toString()
|
||||
.replace('ssh://git@github.com', 'https://github.com')
|
||||
.replace('.git', '');
|
||||
|
||||
module.exports = (config, context) => {
|
||||
const additionalPlugins = process.env.SENTRY_AUTH_TOKEN
|
||||
? [
|
||||
@ -20,13 +12,6 @@ module.exports = (config, context) => {
|
||||
|
||||
return {
|
||||
...config,
|
||||
plugins: [
|
||||
...additionalPlugins,
|
||||
...config.plugins,
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.GIT_COMMIT_HASH': JSON.stringify(gitCommitHash),
|
||||
'process.env.GIT_ORIGIN_URL': JSON.stringify(gitOriginUrl),
|
||||
}),
|
||||
],
|
||||
plugins: [...additionalPlugins, ...config.plugins],
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user