cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drk...@apache.org
Subject [13/31] git commit: Added parameter for branch
Date Tue, 15 Oct 2013 18:39:54 GMT
Added parameter for branch


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

Branch: refs/heads/master
Commit: 25130b542322b1a4494ca1d802c0bc59ef909010
Parents: 55f7a3e
Author: David Kemp <drkemp@google.com>
Authored: Thu Aug 22 16:09:47 2013 -0400
Committer: David Kemp <drkemp@chromium.org>
Committed: Tue Oct 15 14:11:55 2013 -0400

----------------------------------------------------------------------
 writejson.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/25130b54/writejson.js
----------------------------------------------------------------------
diff --git a/writejson.js b/writejson.js
index 54feddc..296afba 100644
--- a/writejson.js
+++ b/writejson.js
@@ -1,9 +1,13 @@
 var path = require ('path');
 var shell = require('shelljs');
 var fs = require('fs');
+var argv = require('optimist').argv;
 
 var TEST_DIR=process.cwd();
 var MSPEC_DIR=path.join(TEST_DIR,'mobilespec');
+var BRANCH="dev";
+
+if(argv.branch) BRANCH=argv.branch;
 
 fs.writeFileSync(path.join(MSPEC_DIR,'.cordova','config.json'),
 '{\
@@ -12,13 +16,13 @@ fs.writeFileSync(path.join(MSPEC_DIR,'.cordova','config.json'),
   "lib": {\
     "android": {\
       "uri": "'+TEST_DIR+'/cordova-android",\
-      "version": "dev",\
-      "id": "cordova-android-dev"\
+      "version": "'+BRANCH+'" ,\
+      "id": "cordova-android-'+BRANCH+'"\
     },\
     "ios": {\
       "uri": "'+TEST_DIR+'/cordova-ios",\
-      "version": "dev",\
-      "id": "cordova-ios-dev"\
+      "version": "'+BRANCH+'",\
+      "id": "cordova-ios-'+BRANCH+'"\
     }\
   }\
 }');


Mime
View raw message