mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
update frontend pre-commit hook
This commit is contained in:
parent
4d01b6adfb
commit
7e4f95a19b
1 changed files with 5 additions and 6 deletions
|
|
@ -1,13 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
$UI_DIR="hyperglass/ui"
|
||||
UI_DIR="./hyperglass/ui"
|
||||
|
||||
if git diff --cached --name-only | grep --quiet "$UI_DIR"
|
||||
if git diff --cached --name-only | grep --quiet $UI_DIR
|
||||
then
|
||||
cd $UI_DIR
|
||||
yarn typecheck
|
||||
else
|
||||
echo "No frontend files have changed, skipping pre-commit check..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd $UI_DIR
|
||||
|
||||
yarn typecheck
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue