Skip to content

Instantly share code, notes, and snippets.

@phil-lopreiato
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-lopreiato/a4f9039286c29bc5f1f2 to your computer and use it in GitHub Desktop.
Save phil-lopreiato/a4f9039286c29bc5f1f2 to your computer and use it in GitHub Desktop.
Script to deploy TBA to App Engine, then generate and include the endpoints library
#! /bin/bash
perl -pi -e 's/tbatv-dev-hrd/tba-dev-phil/g' ~/Documents/Code/the-blue-alliance/app.yaml
./appcfg.py --oauth2 rollback ~/Documents/Code/the-blue-alliance/
# Replace cron.yaml with a different file to disable cron jobs
mv ~/Documents/Code/the-blue-alliance/cron.yaml ~/Documents/Code/the-blue-alliance/cron.yaml.bak
cp ~/Documents/Code/cron.yaml.simple ~/Documents/Code/the-blue-alliance/cron.yaml
./appcfg.py --oauth2 update ~/Documents/Code/the-blue-alliance/
# Restore cron.yaml
mv ~/Documents/Code/the-blue-alliance/cron.yaml.bak ~/Documents/Code/the-blue-alliance/cron.yaml
cd ~/Documents/Code/the-blue-alliance/
git apply ../endpoints.patch
/home/phil/google_appengine/endpointscfg.py get_client_lib java -o . -bs maven mobile_main.MobileAPI
git apply -R ../endpoints.patch
mv ./tbaMobile-v9.zip ..
cd ..
rm -r tbaMobile
unzip -o tbaMobile-v9.zip
rm tbaMobile-v9.zip
cd tbaMobile
mvn install
cp /home/phil/Documents/Code/tbaMobile/target/tbaMobile-v9-1.19.1-SNAPSHOT.jar /home/phil/Documents/Code/thebluealliance-android/android/libs/tbaMobile-v9-1.19.0-SNAPSHOT-debug.jar
cd /home/phil/google_appengine
perl -pi -e 's/tba-dev-phil/tbatv-dev-hrd/g' ~/Documents/Code/the-blue-alliance/app.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment