Created
September 5, 2012 15:26
-
-
Save xanf/3638383 to your computer and use it in GitHub Desktop.
build.phonegap.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOKEN="mytokenhere" | |
APP=0000100 | |
$SENCHA_SDK_TOOLS_2_0_0_BETA3/sencha app build -e testing || exit 1 | |
pushd ./build/testing >/dev/null | |
zip ../app.zip -r * >/dev/null | |
popd >/dev/null | |
echo -n "Uploading to build.phonegap.com..." | |
curl -s -o /dev/null -X PUT -F file=@./build/app.zip https://build.phonegap.com/api/v1/apps/$APP\?auth_token\=$TOKEN || exit 1 | |
echo "done" | |
status(){ | |
curl -s https://build.phonegap.com/api/v1/apps/$APP?auth_token=$TOKEN | jsawk 'return this.status.android' | |
} | |
echo -n "Waiting for compile to finish..." | |
while [ $(status) = "pending" ] | |
do | |
echo -n "." | |
sleep 5; | |
done | |
echo "done" | |
echo -n "Downloading apk..." | |
curl -sL https://build.phonegap.com/api/v1/apps/$APP/android\?auth_token\=$TOKEN > /tmp/install.apk | |
echo "done" | |
adb install -r /tmp/install.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment