Add pre-commit hook that runs all the checks.

This commit is contained in:
baldo 2022-08-26 16:16:26 +02:00
parent f0dcb63418
commit ac8159ce1d
2 changed files with 24 additions and 1 deletions
git-hooks

21
git-hooks/pre-commit Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
export PATH="$PWD/nix:$PATH"
for directory in . ./frontend; do
if [[ -d "$directory" ]]; then
echo
echo "==================================================="
echo "Checking: $PWD"
echo "==================================================="
echo
pushd "$directory"
yarn run check
popd
fi
done