cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zasp...@apache.org
Subject [22/37] cordova-ubuntu git commit: Run On Device was not working because of invalid calls.
Date Mon, 15 Dec 2014 13:33:11 GMT
Run On Device was not working because of invalid calls.


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

Branch: refs/heads/master
Commit: 1d007b524b41487c29cf97c0ad3618df8f60773e
Parents: d931acc
Author: Jean-Francois Moy <jeanfrancois.moy@gmail.com>
Authored: Thu Nov 6 11:51:13 2014 +0000
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Thu Nov 6 16:05:40 2014 +0300

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/run.js | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/1d007b52/bin/templates/project/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/run.js b/bin/templates/project/cordova/lib/run.js
index 0418fce..c0beaee 100644
--- a/bin/templates/project/cordova/lib/run.js
+++ b/bin/templates/project/cordova/lib/run.js
@@ -30,7 +30,7 @@ var Devices = require('./device');
 var Constants = require('./constants');
 var Utils = require('./utils');
 
-var PLATFORMS = Constants.PLATFORM_TYPES; 
+var PLATFORMS = Constants.PLATFORM_TYPES;
 var MSG = Constants.MSG;
 
 module.exports.run = function(rootDir, desktop, debug, target, nobuild, emulator, framework)
{
@@ -96,8 +96,8 @@ function runNative(rootDir, debug) {
 function runOnDevice(rootDir, debug, target, architecture, framework) {
     var ubuntuDir = path.join(rootDir, 'platforms', 'ubuntu');
 
-    if (!isDeviceAttached(target)) {
-        console.error(MSG.UBUNTU_TOUCH_DEVICE_NOT_AVALIABLE.red)
+    if (!Devices.isAttached(target)) {
+        console.error(MSG.UBUNTU_TOUCH_DEVICE_NOT_AVALIABLE.red);
         process.exit(1);
     }
 
@@ -115,23 +115,22 @@ function runOnDevice(rootDir, debug, target, architecture, framework)
{
 
     assert.ok(names.length == 1);
 
-    adbExec(target, 'shell "ps -A -eo pid,cmd | grep cordova-ubuntu | awk \'{ print \\$1
}\' | xargs kill -9"')
+    Devices.adbExec(target, 'shell "ps -A -eo pid,cmd | grep cordova-ubuntu | awk \'{ print
\\$1 }\' | xargs kill -9"');
 
     if (debug)
-        adbExec(target, 'forward --remove-all');
+        Devices.adbExec(target, 'forward --remove-all');
 
-    adbExec(target, 'push ' + names[0] + ' /home/phablet');
-    adbExec(target, 'shell "cd /home/phablet/; pkcon install-local ' + names[0] + ' -p --allow-untrusted
-y"');
+    Devices.adbExec(target, 'push ' + names[0] + ' /home/phablet');
+    Devices.adbExec(target, 'shell "cd /home/phablet/; pkcon install-local ' + names[0] +
' -p --allow-untrusted -y"');
 
     if (debug) {
         console.error('Debug enabled. Try pointing a WebKit browser to http://127.0.0.1:9222');
-
-        adbExec(target, 'forward tcp:9222 tcp:9222');
+        Devices.adbExec(target, 'forward tcp:9222 tcp:9222');
     }
 
     console.log('have fun!'.rainbow);
 
-    return adbExecAsync(target, 'shell bash -c "ubuntu-app-launch  \\`ubuntu-app-triplet
' + appId + '\\`"').then(function () {
+    return Devices.adbExecAsync(target, 'shell bash -c "ubuntu-app-launch  \\`ubuntu-app-triplet
' + appId + '\\`"').then(function () {
         Utils.popd();
     });
 }


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


Mime
View raw message