Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
c3d44c95c2
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  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