summaryrefslogtreecommitdiffstats
path: root/hooks/pre-commit
blob: 8336947f8a665a6dec1cdb37c899c7d85e8721c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

if [ $(git rev-parse --abbrev-ref HEAD) != "main" ]; then
	exit 0
fi

cd $(git rev-parse --show-toplevel)

echo "Building docs"
make -C docs txt
make -C docs html

echo "Running tests before commit to main"
go test ./...

cd -