cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject webworks commit: CB-6021 Add --release to run command
Date Wed, 12 Feb 2014 20:41:14 GMT
Updated Branches:
  refs/heads/master 49c40694f -> ca270a12c


CB-6021 Add --release to run command


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

Branch: refs/heads/master
Commit: ca270a12cd65e7922691a70ad5187f401f395d23
Parents: 49c4069
Author: Bryan Higgins <bhiggins@blackberry.com>
Authored: Wed Feb 12 12:32:06 2014 -0500
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Wed Feb 12 15:40:07 2014 -0500

----------------------------------------------------------------------
 blackberry10/bin/templates/project/cordova/lib/run-utils.js | 4 ++--
 blackberry10/bin/templates/project/cordova/lib/run.js       | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/ca270a12/blackberry10/bin/templates/project/cordova/lib/run-utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/run-utils.js b/blackberry10/bin/templates/project/cordova/lib/run-utils.js
index eb4ae0d..ff745f2 100644
--- a/blackberry10/bin/templates/project/cordova/lib/run-utils.js
+++ b/blackberry10/bin/templates/project/cordova/lib/run-utils.js
@@ -140,8 +140,8 @@ function validateTarget(options, targetName, allDone) {
 function handleDebugToken(options, deployTarget, allDone) {
     options.keystorepass = session.getKeyStorePass(options);
 
-    // if target has no pin, skip the debug token feature
-    if (deployTarget.pin && !options.emulator) {
+    // deploy debug token for device debug builds only
+    if (deployTarget.pin && !options.emulator && options.build &&
!options.release) {
         async.waterfall(
             [
                 debugTokenHelper.checkDebugToken.bind(this, deployTarget.pin),

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/ca270a12/blackberry10/bin/templates/project/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/run.js b/blackberry10/bin/templates/project/cordova/lib/run.js
index f60cd14..48f1f91 100755
--- a/blackberry10/bin/templates/project/cordova/lib/run.js
+++ b/blackberry10/bin/templates/project/cordova/lib/run.js
@@ -30,6 +30,9 @@ function install(deployTarget, done) {
         installTasks = [];
 
     if (options.build) {
+        if (options.release) {
+            buildArgs.push("--release");
+        }
         installTasks.push(utils.exec.bind(this, buildCmd, buildArgs, {"cwd": projectRootDir}));
     }
 
@@ -39,12 +42,13 @@ function install(deployTarget, done) {
 }
 
 options
-    .usage('[--device] [--emulator] [--target=<id>]    [--query] [-k | --keystorepass]
[-devicepass]    [--no-launch] [--no-uninstall] [--no-build]')
+    .usage('[--device] [--emulator] [--target=<id>] [--release] [--query] [-k | --keystorepass]
[--devicepass] [--no-launch] [--no-uninstall] [--no-build]')
     .option('-k, --keystorepass <password>', 'the password of signing key; needed for
creating debug token')
     .option('--device', 'run on connected device')
     .option('--emulator', 'run on BB10 simulator')
     .option('--devicepass <password>', 'device password')
     .option('--target <id>', 'specifies the target to run the application')
+    .option('--release', 'build in release mode')
     .option('--query', 'query on the commandline when a password is needed')
     .option('--no-launch', 'do not launch the application on device')
     .option('--no-build', 'deploy the pre-built bar file and skip building')


Mime
View raw message