Skip to content

Instantly share code, notes, and snippets.

@wlalele
Created June 12, 2018 09:06
Show Gist options
  • Save wlalele/aa1d5b43414c9effe35c866f556997d5 to your computer and use it in GitHub Desktop.
Save wlalele/aa1d5b43414c9effe35c866f556997d5 to your computer and use it in GitHub Desktop.
Git hook pre-push - Resamania2 Groot
#!/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