Last active
January 13, 2018 09:30
-
-
Save vikytech/d1047c41b181e12d9d41fe5a50a7cdfb to your computer and use it in GitHub Desktop.
Git pre push hook
This file contains 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/bash | |
#Example | |
#cd ../performance-suite | |
#sh run.sh | |
#OUT=$? | |
#cd - | |
#if [ $OUT -eq 1 ]; then | |
# echo "\033[31m Gatling failed with exit code $OUT" | |
# echo "\033[41m Push Rejected." | |
# exit 1 | |
#fi | |
#exit 0 |
This file contains 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
#!/usr/bin/env bash | |
if [ ! -x .git/hooks/pre-push ] | |
then | |
echo "\033[33m Setting Up Git pre push Hook......" | |
mkdir -p .git/hooks/ | |
else | |
echo "\033[36m Updating Git pre-push Hook......" | |
fi | |
cp pre-push .git/hooks/pre-push | |
chmod +x .git/hooks/pre-push | |
echo "\033[32m Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment