You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/01/24 20:21:50 UTC

git commit: Run android config after install.

Updated Branches:
  refs/heads/master b194da1df -> e76937372
Updated Tags:  refs/tags/2.4.0rc1-1 [created] e76937372


Run android config after install.


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

Branch: refs/heads/master
Commit: e7693737247342b9dc808256ab7224d23d48a622
Parents: b194da1
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jan 24 11:23:39 2013 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jan 24 11:23:39 2013 -0800

----------------------------------------------------------------------
 .gitignore   |    4 +---
 bootstrap.js |   38 +++++++++++++-------------------------
 package.json |    4 ++--
 3 files changed, 16 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/e7693737/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 7c3253a..f80e23b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,4 @@ npm-debug.log
 temp
 .DS_Store
 spec/fixtures/projects/native
-lib/cordova-android/bin/templates/cordova/appinfo.jar
-lib/cordova-android/framework/bin
-lib/cordova-android/framework/project.properties
+lib

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/e7693737/bootstrap.js
----------------------------------------------------------------------
diff --git a/bootstrap.js b/bootstrap.js
index 9bc77c7..b93331c 100644
--- a/bootstrap.js
+++ b/bootstrap.js
@@ -8,30 +8,18 @@ var util      = require('./src/util'),
     shell     = require('shelljs'),
     platforms = require('./platforms');
 
-var android = path.join(__dirname, 'lib', 'cordova-android', 'framework');
+// Create native projects using bin/create
+var tempDir = path.join(__dirname, 'spec', 'fixtures', 'projects', 'native');
+shell.rm('-rf', tempDir);
+shell.mkdir('-p', tempDir);
 
-// Update cordova-android based on local sdk
-shell.exec('cd ' + android + ' && android update project -p . -t android-17', {silent:true, async:true}, function(code, output) {
-    if (code > 0) {
-        console.error('ERROR! Could not configure Android properties. Are you sure you have the Android SDK installed and the tools available on your PATH? (make sure you can run `android` from your command-line). Error output to follow:');
-        console.error(output);
-        process.exit(1);
-    } else {
-        // Create native projects using bin/create
-        var tempDir = path.join(__dirname, 'spec', 'fixtures', 'projects', 'native');
-        shell.rm('-rf', tempDir);
-        shell.mkdir('-p', tempDir);
-
-        platforms.forEach(function(platform) {
-            var fix_path = path.join(tempDir, platform + '_fixture');
-            var create = path.join(util.libDirectory, 'cordova-' + platform, 'bin', 'create'); 
-            console.log('Creating cordova-' + platform + ' project using live project lib for tests...');
-            var cmd = create + ' "' + fix_path + '" org.apache.cordova.cordovaExample cordovaExample';
-            if (platform == 'blackberry') cmd = create + ' "' + fix_path + '" cordovaExample';
-            var create_result = shell.exec(cmd, {silent:true});
-            if (create_result.code > 0) throw ('Could not create a native ' + platform + ' project test fixture: ' + create_result.output);
-            console.log('.. complete.');
-        });
-    }
+platforms.forEach(function(platform) {
+    var fix_path = path.join(tempDir, platform + '_fixture');
+    var create = path.join(util.libDirectory, 'cordova-' + platform, 'bin', 'create'); 
+    console.log('Creating cordova-' + platform + ' project using live project lib for tests...');
+    var cmd = create + ' "' + fix_path + '" org.apache.cordova.cordovaExample cordovaExample';
+    if (platform == 'blackberry') cmd = create + ' "' + fix_path + '" cordovaExample';
+    var create_result = shell.exec(cmd, {silent:true});
+    if (create_result.code > 0) throw ('Could not create a native ' + platform + ' project test fixture: ' + create_result.output);
+    console.log('.. complete.');
 });
-

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/e7693737/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index d0f8c8c..ec64fc9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "2.4.0",
+  "version": "2.4.1",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",
@@ -9,7 +9,7 @@
   },
   "scripts": {
     "test": "./node_modules/jasmine-node/bin/jasmine-node --color spec",
-    "install": "node bootstrap.js && ./bin/notice"
+    "install": "cd lib/cordova-android/framework && android update project -p . -t android-17 && cd ../../.. && node bootstrap.js && ./bin/notice"
   },
   "repository": {
     "type": "git",