badguardhome/scripts/hooks/pre-commit
Ainar Garipov 6f7fd33afd Pull request: all: imp scripts
Merge in DNS/adguard-home from imp-sh to master

Squashed commit of the following:

commit 477832e11eca2ef7ac0071b5da938dacb2ed617d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed May 19 20:24:34 2021 +0300

    scripts: rm dbg

commit dbb4b8c783f607781b980dcd57d78085c9022e72
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed May 19 20:21:20 2021 +0300

    all: imp code, compat, docs

commit e6e4375d67ad1c213efb04411e3ba0bc6293f936
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed May 19 19:33:48 2021 +0300

    all: imp scripts
2021-05-19 20:31:20 +03:00

29 lines
568 B
Bash
Executable File

#!/bin/sh
set -e -f -u
if [ "$( git diff --cached --name-only -- 'client/*.js' )" ]
then
make js-lint js-test
fi
if [ "$( git diff --cached --name-only -- 'client2/*.js' 'client2/*.ts' 'client2/*.tsx' )" ]
then
make js-beta-lint js-beta-test
fi
if [ "$( git diff --cached --name-only -- '*.go' '*.mod' '*.sh' 'Makefile' )" ]
then
make go-os-check go-lint go-test
fi
if [ "$( git diff --cached --name-only -- '*.md' '*.yaml' '*.yml' )" ]
then
make txt-lint
fi
if [ "$( git diff --cached --name-only -- './openapi/openapi.yaml' )" ]
then
make openapi-lint
fi