Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: third_party/pkg/di/scripts/changelog.js

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/di/run-tests.sh ('k') | third_party/pkg/di/test/assets/gen_test1/a.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
});
};
« no previous file with comments | « third_party/pkg/di/run-tests.sh ('k') | third_party/pkg/di/test/assets/gen_test1/a.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698