Created
June 12, 2018 09:06
-
-
Save wlalele/aa1d5b43414c9effe35c866f556997d5 to your computer and use it in GitHub Desktop.
Git hook pre-push - Resamania2 Groot
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 | |
make requirements-status | |
make code-analysis | |
make coding-standard | |
make deprecation-detection | |
docker-compose exec php make unit-test | |
docker-compose exec php make behavior-test | |
make database-test | |
while true; do | |
echo "\n\nYou are about to push your modifications to the repository." | |
read -p "Are you sure you want to do that ? (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