Skip to content

Instantly share code, notes, and snippets.

@acidtib
Created October 19, 2012 19:22
Show Gist options
  • Save acidtib/3920156 to your computer and use it in GitHub Desktop.
Save acidtib/3920156 to your computer and use it in GitHub Desktop.
Custom git command with cap deploy
#!/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
@acidtib
Copy link
Author

acidtib commented Oct 19, 2012

chmod ugo+x push.sh
mv push.sh /usr/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment