cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject cordova-paramedic git commit: CB-11473: add a `--version` flag, which will just print the version from package.json and exit. Closes #20.
Date Tue, 28 Feb 2017 16:21:14 GMT
Repository: cordova-paramedic
Updated Branches:
  refs/heads/master 25900dcf6 -> 92ecc9878


CB-11473: add a `--version` flag, which will just print the version from package.json and
exit. Closes #20.


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

Branch: refs/heads/master
Commit: 92ecc98786dcd2f68ce40c18e4dd988c425bacd3
Parents: 25900dc
Author: filmaj <maj.fil@gmail.com>
Authored: Thu Dec 15 20:47:02 2016 -0800
Committer: filmaj <maj.fil@gmail.com>
Committed: Tue Feb 28 08:20:45 2017 -0800

----------------------------------------------------------------------
 main.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/92ecc987/main.js
----------------------------------------------------------------------
diff --git a/main.js b/main.js
index 276a813..e6476a2 100755
--- a/main.js
+++ b/main.js
@@ -25,7 +25,7 @@ var paramedic       = require('./lib/paramedic');
 var ParamedicConfig = require('./lib/ParamedicConfig');
 
 var USAGE           = "Error missing args. \n" +
-    "cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild --timeout MSECS --startport
PORTNUM --endport PORTNUM --browserify]\n" +
+    "cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild --timeout MSECS --startport
PORTNUM --endport PORTNUM --browserify --version]\n" +
     "`PLATFORM` : the platform id. Currently supports 'ios', 'browser', 'windows', 'android',
'wp8'.\n" +
                     "\tPath to platform can be specified as link to git repo like:\n" +
                     "\twindows@https://github.com/apache/cordova-windows.git\n" +
@@ -60,12 +60,16 @@ var USAGE           = "Error missing args. \n" +
     "--tccDb : (optional) iOS only - specifies the path for the TCC.db file to be copied.\n"
+
     "--useTunnel: (optional) use tunneling instead of local address. default is false\n"
+
     "--verbose : (optional) verbose mode. Display more information output\n" +
+    "--version : (optional) prints cordova-paramedic version and exits\n" +
     "";
 
 var argv = parseArgs(process.argv.slice(2));
 var pathToParamedicConfig = argv.config && path.resolve(argv.config);
 
-if (pathToParamedicConfig || // --config
+if (argv.version) {
+    console.log(require('./package.json')['version']);
+    process.exit(0);
+} else if (pathToParamedicConfig || // --config
     argv.platform && argv.plugin) { // or --platform and --plugin
 
     var paramedicConfig = pathToParamedicConfig ?


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


Mime
View raw message