From 97007f24414085a4507d5fbad12d3e8088e24d5f Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 12 Aug 2014 13:46:11 -0700 Subject: [PATCH 1/9] ios-sim build script --- scripts/generate-dev-bundle.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index e399c67432..21c152fbe3 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -71,6 +71,23 @@ umask 022 mkdir build cd build + +# ios-sim is used to run iPhone simulator from the command-line. Doesn't make +# sense to build it for linux. +if [ "$OS" == "osx" ]; then + which rake # rake is required to build ios-sim + git clone https://github.com/phonegap/ios-sim.git + cd ios-sim + git checkout 2.0.1 + rake build + which build/Release/ios-sim # check that we have in fact got the binary + mkdir -p "$DIR/lib/ios-sim" + cp -r build/Release/* "$DIR/lib/ios-sim/" + echo "done building ios-sim" +fi + + +cd "$DIR/build" git clone https://github.com/joyent/node.git cd node # When upgrading node versions, also update the values of MIN_NODE_VERSION at From c889dfdc76daad2d42cc7469fc35033cdf1fcc6a Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 12 Aug 2014 17:17:41 -0700 Subject: [PATCH 2/9] ios-deploy, download ios-sim from s3 --- scripts/generate-dev-bundle.sh | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index 21c152fbe3..ed52d1c618 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -75,15 +75,30 @@ cd build # ios-sim is used to run iPhone simulator from the command-line. Doesn't make # sense to build it for linux. if [ "$OS" == "osx" ]; then - which rake # rake is required to build ios-sim - git clone https://github.com/phonegap/ios-sim.git - cd ios-sim - git checkout 2.0.1 - rake build - which build/Release/ios-sim # check that we have in fact got the binary + # the build from source is not going to work on old OS X versions, until we + # upgrade our Mac OS X Jenkins machine, download the precompiled tarball + + # which rake # rake is required to build ios-sim + # git clone https://github.com/phonegap/ios-sim.git + # cd ios-sim + # git checkout 2.0.1 + # rake build + # which build/Release/ios-sim # check that we have in fact got the binary + # mkdir -p "$DIR/lib/ios-sim" + # cp -r build/Release/* "$DIR/lib/ios-sim/" + + # Download the precompiled tarball + IOS_SIM_URL="http://android-bundle.s3.amazonaws.com/ios-sim.tgz" + curl "$IOS_SIM_URL" | tar xfz - mkdir -p "$DIR/lib/ios-sim" - cp -r build/Release/* "$DIR/lib/ios-sim/" - echo "done building ios-sim" + cp -r ios-sim/ios-sim "$DIR/lib/ios-sim" + + git clone https://github.com/phonegap/ios-deploy.git + cd ios-deploy + make + cd .. + mkdir -p "$DIR/lib/ios-deploy" + cp -r ios-deploy/ios-deploy "$DIR/lib/ios-deploy" fi From 3f04a82ea44af1aef860d960536fbab2002cea44 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 12 Aug 2014 17:24:51 -0700 Subject: [PATCH 3/9] Checkout a certain version of ios-deploy --- scripts/generate-dev-bundle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index ed52d1c618..89bcb31e03 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -95,6 +95,7 @@ if [ "$OS" == "osx" ]; then git clone https://github.com/phonegap/ios-deploy.git cd ios-deploy + git checkout 1.0.9 make cd .. mkdir -p "$DIR/lib/ios-deploy" From 32ae280f22ab030f48808cf1ec9e8ca28f5375b2 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 13 Aug 2014 14:29:34 -0700 Subject: [PATCH 4/9] bump the number on the devbundle --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index ef5aa6b314..2e747b4eb2 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/bin/bash -BUNDLE_VERSION=0.3.45 +BUNDLE_VERSION=0.3.46 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From fdad2c4995094495bf26fe5e662b54d1e0b2a035 Mon Sep 17 00:00:00 2001 From: Matthew Arbesfeld Date: Wed, 13 Aug 2014 15:24:41 -0700 Subject: [PATCH 5/9] Fix platform adding --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 5f6ac05e10..1d5fc32319 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -184,7 +184,7 @@ cordova.ensureCordovaPlatforms = function (localPath) { // eg. ['android 3.5.0', 'ios 3.5.0'] var platformsOutput = platformsList.stdout.split('\n')[0]; - var platformsStrings = platformsOutput.match(/Installed platforms: (.*)/)[1]; + var platformsStrings = platformsOutput.match(/Installed platforms:(.*)/)[1]; if (! platformsStrings) throw new Error('Failed to parse the output of `cordova platform list`: ' + From 9a92b198a8023c7f4dfe2dd1d1dfb881efb6d2a8 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 13 Aug 2014 15:26:54 -0700 Subject: [PATCH 6/9] accept empty string in platforms parsing --- tools/commands-cordova.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 1d5fc32319..90bce74de1 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -184,9 +184,9 @@ cordova.ensureCordovaPlatforms = function (localPath) { // eg. ['android 3.5.0', 'ios 3.5.0'] var platformsOutput = platformsList.stdout.split('\n')[0]; - var platformsStrings = platformsOutput.match(/Installed platforms:(.*)/)[1]; + var platformsStrings = platformsOutput.match(/Installed platforms: (.*)/)[1]; - if (! platformsStrings) + if (platformsStrings === undefined) throw new Error('Failed to parse the output of `cordova platform list`: ' + platformsList.stdout); From 10c3426cb9eabf66ec70293a57b03e12f185805c Mon Sep 17 00:00:00 2001 From: Matthew Arbesfeld Date: Wed, 13 Aug 2014 15:44:01 -0700 Subject: [PATCH 7/9] Add bundle help.txt --- tools/help.txt | 3 +++ tools/tests/cordova-plugins.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tools/help.txt b/tools/help.txt index 9c55cd43c1..0e04961e1c 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -139,6 +139,9 @@ This will not list transitive dependencies. Also lists the Cordova plugins and platforms used by your mobile build directly. +>>> bundle +Deprecated command. Use 'build' instead. + >>> build Pack this project up into a tarball. Usage: meteor build diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index c07a206487..61b0f4f888 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -145,9 +145,11 @@ selftest.define("add cordova plugins", function () { run.matchErr("meteor add platform:"); run = s.run("add", "platform:android"); + run.waitSecs(5); run.match("added platform"); run = s.run("add", "cordova:org.apache.cordova.camera@0.3.0"); + run.waitSecs(5); run.match("added cordova plugin org.apache.cordova.camera"); run = s.run("add", "cordova:org.apache.cordova.file"); From 4349eb089bfbf822631bc337a5d74a8201fc8d73 Mon Sep 17 00:00:00 2001 From: Matthew Arbesfeld Date: Wed, 13 Aug 2014 15:56:50 -0700 Subject: [PATCH 8/9] Add usage to meteor bundle --- tools/help.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/help.txt b/tools/help.txt index 0e04961e1c..1a53a22bd0 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -141,6 +141,7 @@ build directly. >>> bundle Deprecated command. Use 'build' instead. +Usage: meteor bundle >>> build Pack this project up into a tarball. From 0ed5ba1ed9269af69dc360ada85bdfcd5d77790a Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 13 Aug 2014 16:08:43 -0700 Subject: [PATCH 9/9] put ios-sim and ios-deploy into PATH --- scripts/cordova.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cordova.sh b/scripts/cordova.sh index 740ca24c65..a60fa45320 100755 --- a/scripts/cordova.sh +++ b/scripts/cordova.sh @@ -13,7 +13,7 @@ cd "$ORIG_DIR" ANDROID_BUNDLE="$SCRIPT_DIR/android_bundle" DEV_BUNDLE="$SCRIPT_DIR/dev_bundle" -export PATH=${ANDROID_BUNDLE}/android-sdk/tools:${ANDROID_BUNDLE}/android-sdk/platform-tools:${PATH}; +export PATH=${ANDROID_BUNDLE}/android-sdk/tools:${ANDROID_BUNDLE}/android-sdk/platform-tools:${DEV_BUNDLE}/lib/ios-sim:${DEV_BUNDLE}/lib/ios-deploy:${PATH}; export ANT_HOME=${ANDROID_BUNDLE}/apache-ant-1.9.4 export PATH=${ANT_HOME}/bin:${PATH}