Skip to content

Commit 0762bf8

Browse files
committed
Only generate releases for master branch
1 parent 2f7a9fd commit 0762bf8

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

packages/app/config/webpack.prod.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ const normalizeName = require('webpack/lib/optimize/SplitChunksPlugin')
1010
const ManifestPlugin = require('webpack-manifest-plugin');
1111
const CopyWebpackPlugin = require('copy-webpack-plugin');
1212
const VERSION = require('@codesandbox/common/lib/version').default;
13+
const childProcess = require('child_process');
1314
const commonConfig = require('./webpack.common');
1415

1516
const publicPath = '/';
17+
const isMaster =
18+
childProcess
19+
.execSync('git branch')
20+
.toString()
21+
.trim() === '* master';
1622

1723
const normalize = normalizeName({ name: true, automaticNameDelimiter: '~' });
1824

@@ -300,10 +306,11 @@ module.exports = merge(commonConfig, {
300306
to: 'public/sse-hooks',
301307
},
302308
]),
303-
new SentryWebpackPlugin({
304-
include: '.',
305-
ignore: ['node_modules', 'webpack.config.js'],
306-
release: VERSION,
307-
}),
309+
isMaster &&
310+
new SentryWebpackPlugin({
311+
include: '.',
312+
ignore: ['node_modules', 'webpack.config.js'],
313+
release: VERSION,
314+
}),
308315
].filter(Boolean),
309316
});

0 commit comments

Comments
 (0)