Skip to content

Commit

Permalink
build(release.config.js): fix bracket scoping issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Jan 2, 2021
1 parent b9e8cc5 commit c8ef15e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const debug = require('debug')(
`${require('./package.json').name.replace('/', '-')}:semantic-release-config`
);

const SHOULD_UPDATE_CHANGELOG = process.env.SHOULD_UPDATE_CHANGELOG === 'true';
const SHOULD_DEPLOY = process.env.SHOULD_DEPLOY === 'true';

// eslint-disable-next-line no-console
console.error(`SHOULD_UPDATE_CHANGELOG=${SHOULD_UPDATE_CHANGELOG}`);
// eslint-disable-next-line no-console
console.error(`SHOULD_DEPLOY=${SHOULD_DEPLOY}`);
debug(`SHOULD_UPDATE_CHANGELOG=${SHOULD_UPDATE_CHANGELOG}`);
debug(`SHOULD_DEPLOY=${SHOULD_DEPLOY}`);

const options = require('./.changelogrc.js');
const { changelogTitle, parserOpts, writerOpts } = options;
Expand Down Expand Up @@ -62,7 +64,7 @@ module.exports = {
]
]
: []),
'@semantic-release/npm',
['@semantic-release/npm'],
[
'@semantic-release/git',
{
Expand All @@ -76,14 +78,18 @@ module.exports = {
message: 'release: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
],
'@semantic-release/github',
['@semantic-release/github'],
...(SHOULD_DEPLOY
? [
'@semantic-release/exec',
{
successCmd: 'npm run deploy'
}
[
'@semantic-release/exec',
{
successCmd: 'npm run deploy'
}
]
]
: [])
]
};

debug('exports =', module.exports);

0 comments on commit c8ef15e

Please sign in to comment.