AdGuardHome/scripts/hooks/pre-commit
Ainar Garipov 6a8f6357e2 Pull request: all: mv IsOpenWrt
Updates #2829.

Squashed commit of the following:

commit a284a26ba5df101c78e6f866d1bdfa540d205666
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 8 20:34:20 2021 +0300

    aghos: fix darwin

commit 9dbd42d75ebb048c83dbd06a1f09d950b3d12181
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 8 20:11:56 2021 +0300

    all: mv IsOpenWrt
2021-04-08 20:42:04 +03:00

24 lines
448 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' 'go.mod')" ]
then
make go-os-check go-lint go-test
fi
if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml')" ]
then
make openapi-lint
fi