cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhi...@apache.org
Subject cordova-cli git commit: CB-9121 Add support for build configuration to be specified using the CLI
Date Fri, 05 Jun 2015 21:41:54 GMT
Repository: cordova-cli
Updated Branches:
  refs/heads/master 322880aa3 -> 9f34c4eb8


CB-9121 Add support for build configuration to be specified using the CLI


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

Branch: refs/heads/master
Commit: 9f34c4eb8b41c27881fc4a54f05845c77b25f112
Parents: 322880a
Author: Nikhil Khandelwal <nikhilkh@microsoft.com>
Authored: Wed Jun 3 15:21:57 2015 -0700
Committer: Nikhil Khandelwal <nikhilkh@microsoft.com>
Committed: Fri Jun 5 14:36:14 2015 -0700

----------------------------------------------------------------------
 Code          | Bin 0 -> 1519288 bytes
 doc/build.txt |  12 ++++++++++--
 doc/run.txt   |  12 ++++++++++--
 src/cli.js    |   5 ++++-
 4 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9f34c4eb/Code
----------------------------------------------------------------------
diff --git a/Code b/Code
new file mode 100644
index 0000000..f953485
Binary files /dev/null and b/Code differ

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9f34c4eb/doc/build.txt
----------------------------------------------------------------------
diff --git a/doc/build.txt b/doc/build.txt
index 0f5c716..46d3802 100644
--- a/doc/build.txt
+++ b/doc/build.txt
@@ -1,14 +1,15 @@
 Synopsis
 
-    cordova-cli build [PROD] [TARGET] [EXP] [PLATS] [-- POPTS]
+    cordova build [PROD] [TARGET] [EXP] [PLATS] [BUILDCONFIG] [-- POPTS]
 
       PROD:   --debug|--release
       TARGET: --device|--emulator|--target=FOO
       EXP:    --experimental [EXPERIMENTALFLAGS]
       PLATS:  PLATFORM [...]
+      BUILDCONFIG: --buildConfig=CONFIGFILE
       POPTS:  platformopts
 
-Shortcut for `cordova-cli prepare` + `cordova-cli compile` for
+Shortcut for `cordova prepare` + `cordova compile` for
 all/the specified platforms.
 
     --debug ............................ debug build
@@ -18,9 +19,16 @@ all/the specified platforms.
     --emulator ......................... Deploy to an emulator
     --target ........................... Deploy to a specific target
 
+    --buildConfig....................... Use the specified build configuration
+                                         instead of default build.json
+
 To provide platform specific options, you must include them after `--`.
 
 Experimental Flags
 
     --browserify ....................... Plugins javascript gets loaded at build time instead
of runtime using browserify.
                                          Replaces cordovajs file with one that includes the
JS of the installed plugins.
+
+Example
+
+    cordova build android --release --buildConfig=..\myBuildConfig.json
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9f34c4eb/doc/run.txt
----------------------------------------------------------------------
diff --git a/doc/run.txt b/doc/run.txt
index 0e4577e..1979320 100644
--- a/doc/run.txt
+++ b/doc/run.txt
@@ -1,12 +1,13 @@
 Synopsis
 
-    cordova-cli run [MODE] [PROD] [TARGET] [EXP] [PLATS] [-- POPTS]
+    cordova run [MODE] [PROD] [TARGET] [EXP] [PLATS] [BUILDCONFIG] [-- POPTS] 
 
       MODE:       --list|--nobuild
       PROD:        --debug|--release
       TARGET:      DEVICECLASS|--target=FOO
       EXP:         --experimental [EXPERIMENTALFLAGS]
       PLATS:       PLATFORM [...]
+      BUILDCONFIG: --buildConfig=CONFIGFILE
       POPTS:       platformopts
       DEVICECLASS: --device|--emulator
 
@@ -25,10 +26,13 @@ Deploys app on specified platform devices / emulators
                                          Will display both device and emulator
                                          unless DEVICECLASS option is provided
 
+    --buildConfig....................... Use the specified build configuration
+                                         instead of default build.json
+
 To provide platform specific options, you must include them after `--`.
 
 Technical details
-    calls cordova-cli prepare
+    calls cordova prepare
     calls PLATFORM run
         PLATFORM run calls PLATFORM build (unless --nobuild)
 
@@ -36,3 +40,7 @@ Experimental Flags
 
     --browserify ....................... Plugins javascript gets loaded at build time instead
of runtime using browserify.
                                          Replaces cordovajs file with one that includes the
JS of the installed plugins.
+
+Example
+
+    cordova run android --release --buildConfig=..\myBuildConfig.json --target=myEmulator
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9f34c4eb/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index c96c4e3..74a87f0 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -82,6 +82,7 @@ function cli(inputArgs) {
         , 'browserify': Boolean
         , 'nobuild': Boolean
         , 'list': Boolean
+        , 'buildConfig' : String
         };
 
     var shortHands =
@@ -226,7 +227,9 @@ function cli(inputArgs) {
                 downstreamArgs.push('--' + flag);
             }
         });
-
+        if (args.buildConfig) {
+            downstreamArgs.push('--buildConfig=' + args.buildConfig);
+        }
         if (args.target) {
             downstreamArgs.push('--target=' + args.target);
         }


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


Mime
View raw message