| Index: third_party/pkg/di/scripts/changelog.js
|
| diff --git a/third_party/pkg/angular/scripts/changelog/changelog.js b/third_party/pkg/di/scripts/changelog.js
|
| similarity index 82%
|
| copy from third_party/pkg/angular/scripts/changelog/changelog.js
|
| copy to third_party/pkg/di/scripts/changelog.js
|
| index 2177100a308a7ebba86a6c783e4ee01cb300afa8..a6eeeb57bab941c8e0b62e95a3e85f71504b4c98 100755
|
| --- a/third_party/pkg/angular/scripts/changelog/changelog.js
|
| +++ b/third_party/pkg/di/scripts/changelog.js
|
| @@ -8,12 +8,12 @@ var fs = require('fs');
|
| var util = require('util');
|
| var q = require('qq');
|
|
|
| -var GIT_LOG_CMD = 'git log --grep="%s" -E --format=%s %s..HEAD';
|
| +var GIT_LOG_CMD = 'git log --grep="%s" -E --format=%s %s';
|
| var GIT_TAG_CMD = 'git describe --tags --abbrev=0';
|
|
|
| var HEADER_TPL = '<a name="%s"></a>\n# %s (%s)\n\n';
|
| -var LINK_ISSUE = '[#%s](https://github.com/angular/angular.dart/issues/%s)';
|
| -var LINK_COMMIT = '[%s](https://github.com/angular/angular.dart/commit/%s)';
|
| +var LINK_ISSUE = '[#%s](https://github.com/angular/di.dart/issues/%s)';
|
| +var LINK_COMMIT = '[%s](https://github.com/angular/di.dart/commit/%s)';
|
|
|
| var EMPTY_COMPONENT = '$$';
|
|
|
| @@ -123,6 +123,7 @@ var readGitLog = function(grep, from) {
|
| var deferred = q.defer();
|
|
|
| // TODO(vojta): if it's slow, use spawn and stream it instead
|
| + console.log(util.format(GIT_LOG_CMD, grep, '%H%n%s%n%b%n==END==', from));
|
| child.exec(util.format(GIT_LOG_CMD, grep, '%H%n%s%n%b%n==END==', from), function(code, stdout, stderr) {
|
| var commits = [];
|
|
|
| @@ -175,24 +176,12 @@ var writeChangelog = function(stream, commits, version) {
|
| }
|
|
|
|
|
| -var getPreviousTag = function() {
|
| - var deferred = q.defer();
|
| - child.exec(GIT_TAG_CMD, function(code, stdout, stderr) {
|
| - if (code) deferred.reject('Cannot get the previous tag.');
|
| - else deferred.resolve(stdout.replace('\n', ''));
|
| - });
|
| - return deferred.promise;
|
| -};
|
| -
|
| -
|
| -var generate = function(version, file) {
|
| - getPreviousTag().then(function(tag) {
|
| - console.log('Reading git log since', tag);
|
| - readGitLog('^fix|^feat|^perf|BREAKING', tag).then(function(commits) {
|
| - console.log('Parsed', commits.length, 'commits');
|
| - console.log('Generating changelog to', file || 'stdout', '(', version, ')');
|
| - writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, version);
|
| - });
|
| +var generate = function(tagRange, file) {
|
| + console.log('Reading git log for', tagRange);
|
| + readGitLog('^fix|^feat|^perf|BREAKING', tagRange).then(function(commits) {
|
| + console.log('Parsed', commits.length, 'commits');
|
| + console.log('Generating changelog to', file || 'stdout', '(', tagRange, ')');
|
| + writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, tagRange);
|
| });
|
| };
|
|
|
|
|