cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject [1/2] git commit: CB-7616 Deploy on WP8 fails to run specific target
Date Mon, 29 Sep 2014 08:13:58 GMT
Repository: cordova-wp8
Updated Branches:
  refs/heads/3.6.x 95b01b152 -> 1e363e17a


CB-7616 Deploy on WP8 fails to run specific target


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

Branch: refs/heads/3.6.x
Commit: 55785516e853e48d1aaa3318172c688d93c1411a
Parents: 95b01b1
Author: sgrebnov <v-segreb@microsoft.com>
Authored: Tue Sep 23 10:48:22 2014 +0400
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Fri Sep 26 11:56:38 2014 +0400

----------------------------------------------------------------------
 wp8/template/cordova/lib/device.js  | 3 ++-
 wp8/template/cordova/lib/package.js | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/55785516/wp8/template/cordova/lib/device.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/device.js b/wp8/template/cordova/lib/device.js
index f79a4fe..c963533 100644
--- a/wp8/template/cordova/lib/device.js
+++ b/wp8/template/cordova/lib/device.js
@@ -26,10 +26,11 @@ var Q     = require('q'),
 // returns one of available devices which name match with parovided string
 // return rejected promise if device with name specified not found
 module.exports.findDevice = function (target) {
+    target = target.toLowerCase();
     return module.exports.listDevices()
     .then(function(deviceList) {
         for (var idx in deviceList){
-            if (deviceList[idx].indexOf(target) > -1) {
+            if (deviceList[idx].toLowerCase() == target) {
                 return Q.resolve(idx);
             }
         }

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/55785516/wp8/template/cordova/lib/package.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/package.js b/wp8/template/cordova/lib/package.js
index e7eeb89..684edd1 100644
--- a/wp8/template/cordova/lib/package.js
+++ b/wp8/template/cordova/lib/package.js
@@ -21,6 +21,7 @@ var Q     = require('q'),
     fs    = require('fs'),
     path  = require('path'),
     shell = require('shelljs'),
+    device = require ('./device'),
     utils = require('./utils');
 
 function Package (packagepath) {
@@ -32,7 +33,7 @@ Package.prototype.deployTo = function (deployTarget) {
     return utils.getXapDeploy()
     .then(function (xapDeploy) {
         var getTarget = deployTarget == "device" ? Q("de") :
-            deployTarget == "emulator" ? Q("xd") : module.exports.findDevice(deployTarget);
+            deployTarget == "emulator" ? Q("xd") : device.findDevice(deployTarget);
 
         return getTarget.then(function (target) {
             return utils.spawn(xapDeploy, ['/installlaunch', pkg.packagePath, '/targetdevice:'
+ target]);


Mime
View raw message