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 -