diff options
author | Marc Coquand <marc@mccd.space> | 2023-12-20 20:46:00 -0600 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2023-12-25 18:22:59 -0600 |
commit | 262f161f42c4e59beec41c6f440336c38385426a (patch) | |
tree | 6491c9b661a0b5a14c9a30ecf25e036f8762239d /.githooks | |
parent | cc783c157f31e7e713c8b83be67449b1859dac27 (diff) | |
download | fixgen-262f161f42c4e59beec41c6f440336c38385426a.tar.gz fixgen-262f161f42c4e59beec41c6f440336c38385426a.tar.bz2 fixgen-262f161f42c4e59beec41c6f440336c38385426a.zip |
Initial commit
Diffstat (limited to '')
-rwxr-xr-x | .githooks/pre-commit | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..de1c2ce --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +git stash --keep-index --include-untracked --message "Pre-commit hook" + +lintStageResult=0 +dune build && dune runtest || lintStageResult=$? + +git stash pop +if [ $lintStageResult -ne 0 ]; then + echo "Test stage failed" + exit 1 +fi + +git notes append -m "Built and tested with dune +Reported-by: precommit hook" + + + |