Просмотр исходного кода

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 лет назад
Родитель
Сommit
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