You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/10/05 18:57:39 UTC

cordova-coho git commit: added warning when trying to run update-release-notes and repo has no existing tags

Repository: cordova-coho
Updated Branches:
  refs/heads/master bd485e2de -> 3bf2048da


added warning when trying to run update-release-notes and repo has no existing tags


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/3bf2048d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/3bf2048d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/3bf2048d

Branch: refs/heads/master
Commit: 3bf2048da31843ec2d63587804ceac5fb2e1ea94
Parents: bd485e2
Author: Steve Gill <st...@gmail.com>
Authored: Thu Oct 5 11:57:36 2017 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Oct 5 11:57:36 2017 -0700

----------------------------------------------------------------------
 src/update-release-notes.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/3bf2048d/src/update-release-notes.js
----------------------------------------------------------------------
diff --git a/src/update-release-notes.js b/src/update-release-notes.js
index 4df2d0e..29de976 100644
--- a/src/update-release-notes.js
+++ b/src/update-release-notes.js
@@ -72,7 +72,12 @@ module.exports = function * () {
             if (argv['from-tag']) {
                 fromTag = argv['from-tag'];
             } else {
-                fromTag = (yield gitutil.findMostRecentTag(repo.versionPrefix))[0];
+                try {
+                    fromTag = (yield gitutil.findMostRecentTag(repo.versionPrefix))[0];
+                } catch (e) {
+                    console.log(`no tags exist in ${repo.packageName}`);
+                    throw 'update-release-notes will not work'
+                }
             }
             if (argv['to-tag']) {
                 toTag = argv['to-tag'];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org