cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject spec commit: CB-6616 add --skipjs option
Date Thu, 15 May 2014 20:15:48 GMT
Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master 0aa5425f5 -> c0ed3d7ce


CB-6616 add --skipjs option

Add the --skipjs option which will skip the step of overwriting the platform's
cordova.js file with a freshly generated one from the local cordova-js git
repo. Useful in rare circumstances for testing RC and production releases.


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

Branch: refs/heads/master
Commit: c0ed3d7ceaad6ede3325ab5bf582b7060663fac4
Parents: 0aa5425
Author: Marcel Kinard <cmarcelk@gmail.com>
Authored: Thu May 15 16:13:42 2014 -0400
Committer: Marcel Kinard <cmarcelk@gmail.com>
Committed: Thu May 15 16:13:42 2014 -0400

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/c0ed3d7c/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index fda2c2d..54152dd 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -65,7 +65,7 @@ var top_dir =             process.cwd() + path.sep,
                           "ios": "www",
                           "windows8": "www",
                           "wp8": "www"},
-    argv = optimist.usage("\nUsage: $0 [--android] [--blackberry10] [--ios] [--windows8]
[--wp8] [-h|--help] [--plugman] [--global]\n" +
+    argv = optimist.usage("\nUsage: $0 [--android] [--blackberry10] [--ios] [--windows8]
[--wp8] [-h|--help] [--plugman] [--global] [--skipjs]\n" +
                           "At least one platform must be specified.\n" +
                           "A project will be created with the mobile-spec app and all the
core plugins.")
                    .describe("help", "Shows usage.")
@@ -76,8 +76,10 @@ var top_dir =             process.cwd() + path.sep,
                    .describe("wp8", "Add Windows Phone 8 to the mobile-spec projec.t")
                    .describe("plugman", "Use /bin/create and plugman directly instead of
the CLI.")
                    .describe("global", "Use the globally-installed cordova and the downloaded
platforms/plugins from the registry instead of the local git repo. Will use the local git
repo of mobile-spec. Generally used only to test RC or production releases. Cannot be used
with --plugman.")
+                   .describe("skipjs", "Do not update the platform's cordova.js from the
js git repo, use the one already present in the platform. Rarely used, generally to test RC
releases. Cannot be used with --global because it is implied when --global is used.")
                    .boolean("plugman")
                    .boolean("global")
+                   .boolean("skipjs")
                    .alias("h", "help")
                    .argv;
 
@@ -104,6 +106,11 @@ if (argv.plugman && argv.global) {
     optimist.showHelp();
     return;
 }
+if (argv.skipjs && argv.global) {
+    console.log("The --skipjs option can not be used with the --global option.");
+    optimist.showHelp();
+    return;
+}
 
 // If no platforms, then stop and show help
 if (platforms.length === 0){
@@ -231,7 +238,9 @@ if (argv.plugman) {
 
 ////////////////////// update js files for each platform from cordova-js
 
-if (!argv.global) {
+if (argv.skipjs) {
+    console.log("Skipping the js update.");
+} else if (!argv.global) {
     console.log("Updating js for platforms...");
 
     shelljs.pushd(cordova_js_git_dir);


Mime
View raw message