summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/cordova/lib/build.js
diff options
context:
space:
mode:
authorjulie <julie@surfer-172-29-0-85-hotspot.internet-for-guests.com>2017-01-23 17:59:26 -0500
committerjulie <julie@surfer-172-29-0-85-hotspot.internet-for-guests.com>2017-01-23 17:59:26 -0500
commit2c41f6b41de6ee1a2ae83e62b8a15ced677a419e (patch)
tree9fe4fb9e1d89ad6c3444eac5b5d6696b820775a6 /StoneIsland/platforms/ios/cordova/lib/build.js
parent267c9ed075b5355f463b8f2ad17e10880f14dfc8 (diff)
build
Diffstat (limited to 'StoneIsland/platforms/ios/cordova/lib/build.js')
-rwxr-xr-xStoneIsland/platforms/ios/cordova/lib/build.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/StoneIsland/platforms/ios/cordova/lib/build.js b/StoneIsland/platforms/ios/cordova/lib/build.js
index a26f1983..c40bfe8b 100755
--- a/StoneIsland/platforms/ios/cordova/lib/build.js
+++ b/StoneIsland/platforms/ios/cordova/lib/build.js
@@ -76,7 +76,7 @@ module.exports.run = function (buildOpts) {
var buildType = buildOpts.release ? 'release' : 'debug';
var config = buildConfig.ios[buildType];
if(config) {
- ['codeSignIdentity', 'codeSignResourceRules', 'provisioningProfile', 'developmentTeam', 'packageType'].forEach(
+ ['codeSignIdentity', 'codeSignResourceRules', 'provisioningProfile', 'developmentTeam', 'packageType', 'buildFlag'].forEach(
function(key) {
buildOpts[key] = buildOpts[key] || config[key];
});
@@ -84,7 +84,17 @@ module.exports.run = function (buildOpts) {
}
}
- return check_reqs.run().then(function () {
+return require('./list-devices').run()
+ .then(function (devices) {
+ if (devices.length > 0 && !(buildOpts.emulator)) {
+ // we also explicitly set device flag in options as we pass
+ // those parameters to other api (build as an example)
+ buildOpts.device = true;
+ return check_reqs.check_ios_deploy();
+ }
+ }).then(function () {
+ return check_reqs.run();
+ }).then(function () {
return findXCodeProjectIn(projectPath);
}).then(function (name) {
projectName = name;