Skip to content

Instantly share code, notes, and snippets.

@xanf
Created September 5, 2012 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xanf/3638383 to your computer and use it in GitHub Desktop.
Save xanf/3638383 to your computer and use it in GitHub Desktop.
build.phonegap.com
#!/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