2015-04-27 14:17:25 -04:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var fs = require('fs');
|
2015-04-30 15:53:39 -04:00
|
|
|
var cl = require('conventional-changelog');
|
2015-04-27 14:17:25 -04:00
|
|
|
|
2015-04-30 15:53:39 -04:00
|
|
|
var changelogFile = 'CHANGELOG.md';
|
2015-04-27 14:17:25 -04:00
|
|
|
|
2015-04-30 15:53:39 -04:00
|
|
|
var config = {
|
|
|
|
file: changelogFile,
|
|
|
|
repository: 'https://github.com/angular/angular',
|
|
|
|
version: require('../../package.json').version
|
2015-04-27 14:17:25 -04:00
|
|
|
};
|
|
|
|
|
2015-04-30 15:53:39 -04:00
|
|
|
cl(config, function(err, log) {
|
|
|
|
if (err) {
|
|
|
|
console.error('Failed to generate changelog: ' + err);
|
2015-04-27 14:48:53 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-04-30 15:53:39 -04:00
|
|
|
fs.writeFileSync(changelogFile, log);
|
|
|
|
});
|