You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2014/01/22 20:38:31 UTC

[20/50] [abbrv] git commit: CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check

CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/20ee58f0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/20ee58f0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/20ee58f0

Branch: refs/heads/master
Commit: 20ee58f094e057aa31d15110a97ce90cc3c40404
Parents: 07e922f
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Nov 20 09:35:23 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:17 2014 -0800

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/20ee58f0/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 80f88a8..266bec9 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -33,8 +33,10 @@ module.exports.get_target = function() {
         return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
     } else if (fs.existsSync(path.join(ROOT, 'project.properties'))) {
         // if no target found, we're probably in a project and project.properties is in ROOT.
-        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties'));
-        return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
+        // this is called on the project itself, and can support Google APIs AND Vanilla Android
+        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')) ||
+          shell.grep(/target=Google Inc.:Google APIs:[\d+]/, path.join(ROOT, 'project.properties'));
+        return target.split('=')[1].replace('\n', '').replace('\r', '');
     }
 }