1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00

test pre-commit hook

This commit is contained in:
checktheroads 2021-01-03 11:16:03 -07:00
parent 19818e1da9
commit 0da2776f53
2 changed files with 13 additions and 8 deletions

View file

@ -9,6 +9,8 @@ repos:
hooks:
- id: frontend_checks
name: Frontend Checks
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh

View file

@ -2,11 +2,14 @@
UI_DIR="./hyperglass/ui"
if git diff --cached --name-only | grep --quiet $UI_DIR
then
cd $UI_DIR
node_modules/.bin/tsc
else
echo "No frontend files have changed, skipping pre-commit check..."
exit 0
fi
cd $UI_DIR
node_modules/.bin/tsc
# if git diff --cached --name-only | grep --quiet $UI_DIR
# then
# cd $UI_DIR
# node_modules/.bin/tsc
# else
# echo "No frontend files have changed, skipping pre-commit check..."
# exit 0
# fi