1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
checktheroads-hyperglass/.tests/pre-commit-frontend.sh

13 lines
233 B
Bash
Raw Normal View History

2021-01-03 10:59:19 -07:00
#!/usr/bin/env bash
2021-01-03 11:10:20 -07:00
UI_DIR="./hyperglass/ui"
2021-01-03 10:59:19 -07:00
2021-01-03 11:10:20 -07:00
if git diff --cached --name-only | grep --quiet $UI_DIR
2021-01-03 11:05:56 -07:00
then
2021-01-03 11:10:20 -07:00
cd $UI_DIR
yarn typecheck
else
2021-01-03 11:05:56 -07:00
echo "No frontend files have changed, skipping pre-commit check..."
exit 0
fi