summaryrefslogtreecommitdiff
path: root/scripts/git-pre-commit-hook.sh
blob: d6297e7a81db726cba45cb7acbfae438fa7090f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
set -e -u -o pipefail

# All of this is output for humans, not programs.
exec >&2

unit="$(scripts/unit_test.sh)"
if [ $? -ne 0 ]; then
	echo "$unit"
	echo "You have failing unit tests. Aborting git commit."
	exit 1
fi