Ron Eldor | bf007d2 | 2016-12-15 14:42:37 +0200 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Called by "git push" after it has checked the remote status, but before anything has been |
| 4 | # pushed. If this script exits with a non-zero status nothing will be pushed. |
| 5 | # |
| 6 | # This hook is called with the following parameters: |
| 7 | # |
| 8 | # $1 -- Name of the remote to which the push is being done |
| 9 | # $2 -- URL to which the push is being done |
| 10 | # |
| 11 | # If pushing without using a named remote those arguments will be equal. |
| 12 | # |
| 13 | # Information about the commits which are being pushed is supplied as lines to |
| 14 | # the standard input in the form: |
| 15 | # |
| 16 | # <local ref> <local sha1> <remote ref> <remote sha1> |
| 17 | # |
| 18 | set -eu |
| 19 | |
| 20 | REMOTE="$1" |
| 21 | URL="$2" |
| 22 | |
| 23 | echo "REMOTE is $REMOTE" |
| 24 | echo "URL is $URL" |
| 25 | |
| 26 | run_test() |
| 27 | { |
| 28 | TEST=$1 |
| 29 | echo "running '$TEST'" |
| 30 | if ! `$TEST > /dev/null 2>&1`; then |
| 31 | echo "test '$TEST' failed" |
| 32 | return 1 |
| 33 | fi |
| 34 | } |
| 35 | |
| 36 | run_test ./tests/scripts/check-doxy-blocks.pl |
| 37 | run_test ./tests/scripts/check-names.sh |
| 38 | run_test ./tests/scripts/check-generated-files.sh |