mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 08:25:17 -06:00
#10310 run yarn pre-commit only if static files changed
This commit is contained in:
parent
77868a9b17
commit
333a95db4e
@ -41,9 +41,13 @@ if [ $? != 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Checking UI ESLint, TypeScript, and Prettier compliance..."
|
echo "Checking UI ESLint, TypeScript, and Prettier compliance..."
|
||||||
yarn --cwd "$PWD/netbox/project-static" validate
|
git diff --cached --name-only | if grep --quiet 'netbox/project-static/'
|
||||||
if [ $? != 0 ]; then
|
then
|
||||||
EXIT=1
|
echo "Checking UI ESLint, TypeScript, and Prettier compliance..."
|
||||||
|
yarn --cwd "$PWD/netbox/project-static" validate
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
EXIT=1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $EXIT != 0 ]; then
|
if [ $EXIT != 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user