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:
parent
19818e1da9
commit
0da2776f53
2 changed files with 13 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue