cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [08/15] git commit: CB-5907 Make `cordova update` get version from platform's version script
Date Thu, 30 Jan 2014 23:16:57 GMT
CB-5907 Make `cordova update` get version from platform's version script


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

Branch: refs/heads/master
Commit: 1a871a662afb8dbd6b2547563dfef22b241bbb28
Parents: 08c5e35
Author: Josh Soref <jsoref@blackberry.com>
Authored: Mon Jan 27 17:39:25 2014 -0500
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Thu Jan 30 15:11:54 2014 -0800

----------------------------------------------------------------------
 src/platform.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1a871a66/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index e9443c7..e753eaa 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -141,8 +141,15 @@ module.exports = function platform(command, targets) {
                         } else {
                             // Copy the new cordova.js from www -> platform_www.
                             copyCordovaJs();
-                            events.emit('log', plat + ' updated to ' + platforms[plat].version);
-                            d.resolve();
+                            var script = path.join(projectRoot, 'platforms', plat, 'cordova',
'version');
+                            child_process.exec(script, function(err, stdout, stderr) {
+                                var version = platforms[plat].version;
+                                if (!err) {
+                                    version = stdout;
+                                }
+                                events.emit('log', plat + ' updated to ' + version);
+                                d.resolve();
+                            });
                         }
                     });
                     return d.promise;


Mime
View raw message