chore(changelog): update to new changelog package.

Regen-ed the CHANGELOG.md (for consistency). Seems like some old commits
are not present in new the CHANGELOG.md, but it doesn't seem worthy of
further investigation.

closes #3204, #3172
This commit is contained in:
Rado Kirov
2015-07-29 13:44:39 -07:00
parent 34acef58e7
commit 8e960d4052
5 changed files with 1099 additions and 880 deletions

View File

@ -7,41 +7,20 @@
* (https://www.npmjs.com/package/conventional-changelog), which also prepends
* changes to CHANGELOG.md.
*
* By default, this script will generate changes from relevant commits between the
* most recent tag and HEAD. The `from` and `to` flags may be provided to control the range of
* commits to process.
*
* Manually specify begin and end
* $ ./changelog.js --from=e987ac40343d89d47b7b6cc1c5932fd55b30e18a --to=3f7ebde037d92f8d93c6a40c0d73f840cac08287
* Run with default (latest tag...head)
* Runs with default (latest tag...head)
* $ ./changelog.js
*/
var fs = require('fs');
var cl = require('conventional-changelog');
var args = require('minimist')(process.argv.slice(2));
var changelogFile = 'CHANGELOG.md';
var changelogStream = fs.createWriteStream('CHANGELOG.md');
var config = {
file: changelogFile,
repository: 'https://github.com/angular/angular',
version: require('../../package.json').version
preset: 'angular',
releaseCount: 1,
};
if (args.from) {
config.from = args.from;
}
if (args.to) {
config.to = args.to;
}
cl(config, function(err, log) {
if (err) {
console.error('Failed to generate changelog: ' + err);
return;
}
fs.writeFileSync(changelogFile, log);
});
cl(config).on('error', function(err) {
console.error('Failed to generate changelog: ' + err);
}).pipe(changelogStream);