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/09/18 22:03:51 UTC

cordova-coho git commit: update-release-notes fixed, fixed eslint issues

Repository: cordova-coho
Updated Branches:
  refs/heads/master 95e63e537 -> e63a9ba33


update-release-notes fixed, fixed eslint issues


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

Branch: refs/heads/master
Commit: e63a9ba334dedb60c9a4afd4fad96ba8aa975e5c
Parents: 95e63e5
Author: Steve Gill <st...@gmail.com>
Authored: Mon Sep 18 15:03:46 2017 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Mon Sep 18 15:03:46 2017 -0700

----------------------------------------------------------------------
 src/repoutil.js             | 5 +++++
 src/update-release-notes.js | 9 ++++++++-
 src/versionutil.js          | 6 ++----
 3 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/e63a9ba3/src/repoutil.js
----------------------------------------------------------------------
diff --git a/src/repoutil.js b/src/repoutil.js
index 1865926..fd6f052 100644
--- a/src/repoutil.js
+++ b/src/repoutil.js
@@ -181,6 +181,11 @@ var pluginRepos = [
         repoName: 'cordova-plugin-contacts',
         jiraComponentName: 'cordova-plugin-contacts'
     }, {
+        title: 'Plugin - Compat',
+        id: 'plugin-compat',
+        repoName: 'cordova-plugin-compat',
+        jiraComponentName: 'cordova-plugin-compat'
+    }, {
         title: 'Plugin - Device Motion',
         id: 'plugin-device-motion',
         repoName: 'cordova-plugin-device-motion',

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/e63a9ba3/src/update-release-notes.js
----------------------------------------------------------------------
diff --git a/src/update-release-notes.js b/src/update-release-notes.js
index 3a72ba7..4df2d0e 100644
--- a/src/update-release-notes.js
+++ b/src/update-release-notes.js
@@ -166,7 +166,14 @@ function * createNotes (repo, newVersion, changes, overrideDate) {
         data = bold(data, platform);
     });
     // then interpolate linkified changes into existing release notes and compose the final release notes string
-    var relNotesData = fs.readFileSync(path.join(process.cwd(), relNotesFile), {encoding: 'utf8'});
+    var relNotesData;
+    // if being run in cordova directy, cd into repo
+    if (path.basename(process.cwd()) === 'cordova') {
+        relNotesData = fs.readFileSync(path.join(process.cwd(), repo, relNotesFile), {encoding: 'utf8'});
+    } else {
+        // being run in repo directory (Eg cordova/cordova-plugin-device)
+        relNotesData = fs.readFileSync(path.join(process.cwd(), relNotesFile), {encoding: 'utf8'});
+    }
     var headerPos = relNotesData.indexOf('### ');
     var date;
     if (overrideDate) {

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/e63a9ba3/src/versionutil.js
----------------------------------------------------------------------
diff --git a/src/versionutil.js b/src/versionutil.js
index 3f712aa..7c19099 100644
--- a/src/versionutil.js
+++ b/src/versionutil.js
@@ -113,13 +113,11 @@ exports.updateRepoVersion = function * updateRepoVersion (repo, version, opts) {
             shelljs.sed('-i', /VERSION.*=.*;/, 'VERSION = "' + version + '";', path.join('bin', 'templates', 'project', 'cordova', 'version'));
         } else if (repo.id === 'windows') {
             if (fs.existsSync(path.join('template', 'cordova', 'version'))) {
-                console.log('version file exists');
                 shelljs.sed('-i', /VERSION.*=.*;/, 'VERSION = "' + version + '";', path.join('template', 'cordova', 'version'));
             }
         } else if (repo.id === 'browser') {
-            if (fs.existsSync(path.join('bin','template', 'cordova', 'version'))) {
-                console.log('version file exists');
-                shelljs.sed('-i', /VERSION.*=.*;/, 'VERSION = "' + version + '";', path.join('bin','template', 'cordova', 'version'));
+            if (fs.existsSync(path.join('bin', 'template', 'cordova', 'version'))) {
+                shelljs.sed('-i', /VERSION.*=.*;/, 'VERSION = "' + version + '";', path.join('bin', 'template', 'cordova', 'version'));
             }
         }
         shelljs.config.fatal = false;


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