Skip to content

Commit

Permalink
Add --no-changelog option to release.js
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed May 13, 2016
1 parent 461eae8 commit 699f3c8
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions scripts/release.js
Expand Up @@ -6,12 +6,14 @@ let _ = require('lodash');
var argv = require('yargs')
.usage('Usage: $0 <packages> [options]')
.command('packages', '[optional] Comma separated list of packages to build.')
.alias('c', 'no-changelog')
.describe('c', 'Do not update CHANGELOG.md')
.alias('b', 'branch')
.nargs('b', 1)
.describe('b', 'Specify non-master branch to release from')
.help('h')
.alias('h', 'help')
.example('$0 --branch feature', 'Release all packages from "feature" branch')
.example('$0 --no-changelog --branch feature', 'Release all packages from "feature" branch')
.argv;

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

echo('--> Updating CHANGELOG...');
_exec(`node ${rootDir}/scripts/update_changelog.js`);

echo('--> Committing changelog...');
commands.push(``);
commands.push(``);
commands.push(`################# To perform the release ################# `);
commands.push(``);
commands.push(`git commit -m "chore(*): Release prep - Update CHANGELOG" CHANGELOG.md`);
commands.push(`git tag ${version}`);
commands.push(`git push origin ${version}`);
if (!argv['no-changelog']) {
echo('--> Updating CHANGELOG...');
_exec(`node ${rootDir}/scripts/update_changelog.js`);

echo('--> Committing changelog...');
commands.push(``);
commands.push(``);
commands.push(`################# To perform the release ################# `);
commands.push(``);
commands.push(`git commit -m "chore(*): Release prep - Update CHANGELOG" CHANGELOG.md`);
commands.push(`git tag ${version}`);
commands.push(`git push origin ${version}`);
}


Object.keys(projects).map(project => {
Expand Down

0 comments on commit 699f3c8

Please sign in to comment.