Add pre-commit hook that runs all the checks.
This commit is contained in:
parent
f0dcb63418
commit
ac8159ce1d
2 changed files with 24 additions and 1 deletions
git-hooks
21
git-hooks/pre-commit
Executable file
21
git-hooks/pre-commit
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue