From 0b1040491eecd14fe5a9eab19a5db26fdb4e7c0d Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 20 Oct 2014 14:23:35 -0700 Subject: [PATCH] Ignore iOS on build entirely --- tools/commands-cordova.js | 8 +++++--- tools/commands.js | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 51fcc36666..1a7bfdae64 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -79,13 +79,15 @@ cordova.buildTargets = function (localPath, targets, options) { verboseLog('Running build for platforms:', platforms); checkRequestedPlatforms(platforms); - - _.each(platforms, function (platform) { + platforms = _.filter(platforms, function (platform) { if (! _.contains(availablePlatforms, platform)) { Console.warn(platform + ': skipping platform not available on your system'); - return; + return false; } + return true; + }); + _.each(platforms, function (platform) { requirePlatformReady(platform); }); diff --git a/tools/commands.js b/tools/commands.js index a4efcafe14..404c03a782 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -733,6 +733,8 @@ var buildCommand = function (options) { appName: appName })); } catch (err) { + if (err instanceof main.ExitWithCode) + throw err; Console.printError(err, "Error while building for mobile platforms"); return 1; } @@ -814,6 +816,7 @@ var buildCommand = function (options) { var platformPath = path.join(outputPath, platformName); if (platformName === 'ios') { + if (process.platform !== 'darwin') return; files.cp_r(buildPath, path.join(platformPath, 'project')); fs.writeFileSync( path.join(platformPath, 'README'),