diff --git a/Makefile b/Makefile index 3d8625e6..b119de72 100644 --- a/Makefile +++ b/Makefile @@ -68,11 +68,13 @@ js-build: js-deps: $(NPM) $(NPM_FLAGS) ci $(YARN) $(YARN_FLAGS) install -js-lint: - $(NPM) $(NPM_FLAGS) run lint - $(YARN) $(YARN_FLAGS) lint -js-test: - $(NPM) $(NPM_FLAGS) run test + +# TODO(a.garipov): Remove the legacy client tasks support once the new +# client is done and the old one is removed. +js-lint: ; $(NPM) $(NPM_FLAGS) run lint +js-test: ; $(NPM) $(NPM_FLAGS) run test +js-beta-lint: ; $(YARN) $(YARN_FLAGS) lint +js-beta-test: ; # TODO(v.abdulmyanov): Add tests for the new client. go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh go-deps: ; $(ENV) "$(SHELL)" ./scripts/make/go-deps.sh diff --git a/scripts/hooks/pre-commit b/scripts/hooks/pre-commit index 3aa9bd27..859f536f 100755 --- a/scripts/hooks/pre-commit +++ b/scripts/hooks/pre-commit @@ -2,11 +2,16 @@ set -e -f -u -if [ "$(git diff --cached --name-only -- '*.js')" ] +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-lint go-test