Created
October 19, 2012 19:22
-
-
Save acidtib/3920156 to your computer and use it in GitHub Desktop.
Custom git command with cap deploy
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
#!/usr/bin/env bash | |
msg=$1 | |
deploy=$2 | |
if [ -z "$msg" ] ; then | |
echo "Usage: push 'message'" | |
echo "Or: push 'message' deploy to cap deploy" | |
exit 1 | |
fi | |
git add . | |
git commit -m "$msg" | |
git push | |
if [ -n "$deploy" ] ; then | |
cap deploy | |
else | |
echo "run deployer to deploy" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod ugo+x push.sh
mv push.sh /usr/bin