Skip to content

Commit 699f3c8

Browse files
Add --no-changelog option to release.js
1 parent 461eae8 commit 699f3c8

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

scripts/release.js

+16-12
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ let _ = require('lodash');
66
var argv = require('yargs')
77
.usage('Usage: $0 <packages> [options]')
88
.command('packages', '[optional] Comma separated list of packages to build.')
9+
.alias('c', 'no-changelog')
10+
.describe('c', 'Do not update CHANGELOG.md')
911
.alias('b', 'branch')
1012
.nargs('b', 1)
1113
.describe('b', 'Specify non-master branch to release from')
1214
.help('h')
1315
.alias('h', 'help')
14-
.example('$0 --branch feature', 'Release all packages from "feature" branch')
16+
.example('$0 --no-changelog --branch feature', 'Release all packages from "feature" branch')
1517
.argv;
1618

1719
let path = require('path');
@@ -36,17 +38,19 @@ projects = projects.reduce((memo, key) => { memo[key] = true; return memo; }, {}
3638
echo('--> Checking working copy status...');
3739
_exec(`node ${rootDir}/scripts/ensure_clean_master.js ${argv.branch || 'master'}`);
3840

39-
echo('--> Updating CHANGELOG...');
40-
_exec(`node ${rootDir}/scripts/update_changelog.js`);
41-
42-
echo('--> Committing changelog...');
43-
commands.push(``);
44-
commands.push(``);
45-
commands.push(`################# To perform the release ################# `);
46-
commands.push(``);
47-
commands.push(`git commit -m "chore(*): Release prep - Update CHANGELOG" CHANGELOG.md`);
48-
commands.push(`git tag ${version}`);
49-
commands.push(`git push origin ${version}`);
41+
if (!argv['no-changelog']) {
42+
echo('--> Updating CHANGELOG...');
43+
_exec(`node ${rootDir}/scripts/update_changelog.js`);
44+
45+
echo('--> Committing changelog...');
46+
commands.push(``);
47+
commands.push(``);
48+
commands.push(`################# To perform the release ################# `);
49+
commands.push(``);
50+
commands.push(`git commit -m "chore(*): Release prep - Update CHANGELOG" CHANGELOG.md`);
51+
commands.push(`git tag ${version}`);
52+
commands.push(`git push origin ${version}`);
53+
}
5054

5155

5256
Object.keys(projects).map(project => {

0 commit comments

Comments
 (0)