AdGuardHome/scripts/hooks/pre-commit

19 lines
297 B
Plaintext
Raw Normal View History

#!/bin/sh
2020-09-09 12:03:27 +01:00
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
if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml')" ]
then
make openapi-lint
fi