badguardhome/scripts/hooks/pre-commit

14 lines
199 B
Bash
Executable File

#!/bin/sh
set -e -f -u
if [ "$(git diff --cached --name-only -- '*.js')" ]
then
make js-lint js-test
fi
if [ "$(git diff --cached --name-only -- '*.go' 'go.mod')" ]
then
make go-lint go-test
fi