cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhi...@apache.org
Subject cordova-lib git commit: Add support to specify a build config file. If none is specified `build.json` in the project root is used as a default This closes #215
Date Mon, 18 May 2015 21:40:56 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master a0f0bbbb7 -> 7e60b1aa3


Add support to specify a build config file. If none is specified `build.json` in the project
root is used as a default This closes #215


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

Branch: refs/heads/master
Commit: 7e60b1aa3db5ee1143a22ee1527e3b33a04f9a0f
Parents: a0f0bbb
Author: Nikhil Khandelwal <nikhilkh@microsoft.com>
Authored: Tue Mar 31 13:48:32 2015 -0700
Committer: Nikhil Khandelwal <nikhilkh@microsoft.com>
Committed: Mon May 18 14:40:05 2015 -0700

----------------------------------------------------------------------
 cordova-lib/src/cordova/util.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/7e60b1aa/cordova-lib/src/cordova/util.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/util.js b/cordova-lib/src/cordova/util.js
index 2707b85..1f598e8 100644
--- a/cordova-lib/src/cordova/util.js
+++ b/cordova-lib/src/cordova/util.js
@@ -243,6 +243,13 @@ function preProcessOptions (inputOptions) {
         result.platforms = projectPlatforms;
     }
 
+    var buildConfigFound = result.options.some(function (option) {
+        return option.indexOf('--buildConfig') === 0;
+    });
+    if (!buildConfigFound && fs.existsSync(path.join(projectRoot, 'build.json')))
{
+        result.options.push('--buildConfig=' + path.join(projectRoot, 'build.json'));
+    }
+
     return result;
 }
 


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


Mime
View raw message