Skip to content

Instantly share code, notes, and snippets.

@Jd007
Created May 8, 2013 22:40
Show Gist options
  • Save Jd007/5544238 to your computer and use it in GitHub Desktop.
Save Jd007/5544238 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo
echo "Executing Fabric deploy command"
echo
branch=$(git rev-parse --symbolic --abbrev-ref $1)
if [ $branch = "dev" ]
then
echo "Dev branch detected"
/path/to/fabexec/bin/fab -f /path/to/fabfile.py deploy_dev_function
fi
if [ $branch = "master" ]
then
echo "Master branch detected"
/path/to/fabexec/bin/fab -f /path/to/fabfile.py deploy_prod_function
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment