Skip to content

Instantly share code, notes, and snippets.

@tilgovi
Created September 26, 2012 08:21
Show Gist options
  • Select an option

  • Save tilgovi/3786763 to your computer and use it in GitHub Desktop.

Select an option

Save tilgovi/3786763 to your computer and use it in GitHub Desktop.
python git deploy
#!/bin/bash
while IFS=" " read -ra LINE; do
REF=${LINE[2]}
HEAD=`echo ${REF} | awk '{print $NF}' | awk -F/ '{print $NF}'`
GIT_WORK_TREE=~/${HEAD} git checkout -f ${REF}
source ~/${HEAD}/bin/activate
pip install -r ~/${HEAD}/requirements.txt
pip install ~/${HEAD}
deactivate
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment