Created
February 5, 2018 16:21
-
-
Save wlalele/ba9d730fb73e03f7d5c44d9cff7734dc to your computer and use it in GitHub Desktop.
Custom PrePush hook
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 | |
exec < /dev/tty | |
while true; do | |
read -p "Is the documentation, coding-standard and tests okay? (Y/n) " yn | |
if [ "$yn" = "" ]; then | |
yn='Y' | |
fi | |
case $yn in | |
[Yy] ) echo "Pushing..."; break;; | |
[Nn] ) exit 255;; | |
* ) echo "Please answer y or n for yes or no.";; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment