aboutsummaryrefslogtreecommitdiffstats
path: root/.githooks/pre-commit
blob: 14dea2520838111823813f62d02fd79d7d203c42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -e

if command -v odinfmt >/dev/null 2>&1; then
	./format.sh --check
else
	echo "pre-commit: odinfmt not installed, skipping format check (CI still checks it)"
fi
./check.sh

case "$(uname -s)" in
	MINGW* | MSYS* | CYGWIN*) cmd //c compile.bat debug ;;
	*) ./compile.sh debug ;;
esac

if ls test/*.odin >/dev/null 2>&1; then
	odin run test -out:build/test
fi