Last active
December 5, 2016 15:37
-
-
Save matiasinsaurralde/f83e6e11042a0a985cdf6af26eb640f7 to your computer and use it in GitHub Desktop.
pre-push
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
#!/bin/sh | |
current_branch=$(git rev-parse --abbrev-ref HEAD) | |
set "master" "target/cloud" "target/stage" "target/hybrid" | |
exec < /dev/tty | |
for branch in $@ | |
do | |
if [ $current_branch = $branch ]; then | |
echo "Have you modified the version number? (y/n) " | |
read -p "> " confirmation | |
if [ $confirmation != "y" ]; then | |
echo "Aborting push" | |
exit 1 | |
fi | |
echo "Pushing to $current_branch" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment