소스 검색

Do not run frontend tests upon git hooks (#1614)

* test

* tst

* front changes

* Changes pre-commit

* Changes pre-commit

* Changes pre-commit

* non fe change

* fe change

* Removes unnecessary variable

* Remvoes console.log

* Removes newline

* Remove formating by VSCode plugin
Damir Abdulganiev 3 년 전
부모
커밋
c3d44c95c2
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      kafka-ui-react-app/.husky/pre-commit

+ 8 - 1
kafka-ui-react-app/.husky/pre-commit

@@ -1,4 +1,11 @@
 #!/bin/sh
 . "$(dirname "$0")/_/husky.sh"
 
-cd kafka-ui-react-app && npm run pre-commit
+
+if git diff --cached --name-only | grep --quiet "kafka-ui-react-app"
+then
+  cd kafka-ui-react-app && npm run pre-commit
+else 
+  echo "Skipping frontend tests"
+  exit 0
+fi