incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [4/7] git commit: added blackberry shortcut for project creation to speed up specs
Date Mon, 01 Oct 2012 06:46:30 GMT
added blackberry shortcut for project creation to speed up specs


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/31ac868d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/31ac868d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/31ac868d

Branch: refs/heads/cordova-client
Commit: 31ac868d9e8856697b6d1f5f635ad5b5ae653310
Parents: 6695464
Author: Fil Maj <maj.fil@gmail.com>
Authored: Sun Sep 30 23:34:25 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Sun Sep 30 23:34:25 2012 -0700

----------------------------------------------------------------------
 spec/helper.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/31ac868d/spec/helper.js
----------------------------------------------------------------------
diff --git a/spec/helper.js b/spec/helper.js
index 3f7645d..654f7a9 100644
--- a/spec/helper.js
+++ b/spec/helper.js
@@ -3,7 +3,8 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
 var shell = require('shelljs'),
     path = require('path'),
     fs = require('fs'),
-    android_project = path.join(__dirname, 'fixtures', 'projects', 'native', 'android');
+    android_project = path.join(__dirname, 'fixtures', 'projects', 'native', 'android'),
+    bb_project = path.join(__dirname, 'fixtures', 'projects', 'native', 'blackberry');
 
 var orig_exec = shell.exec;
 
@@ -19,6 +20,14 @@ module.exports = {
                 shell.cp('-r', android_project, path.join(dir, '..'));
                 fs.chmodSync(path.join(dir, 'cordova', 'debug'), '754');
                 return {code:0};
+            } else if (cmd.match(/blackberry.bin.create/)) {
+                var r = new RegExp(/blackberry.bin.create"\s"([\/\\\w-_\.]*)"/);
+                var dir = r.exec(cmd)[1];
+                var platformsDir = path.join(dir, '..');
+                shell.cp('-r', bb_project, platformsDir);
+                // TODO: will need to handle bb sub-platforms
+                shell.mv(path.join(platformsDir, 'blackberry'), path.join(platformsDir, 'blackberry-10'));
+                return {code:0};
             }
             // Fire off to original exec
             return orig_exec.apply(null, arguments);


Mime
View raw message