blob: bd9c1be69e5c689557c9290600d3396876b0fb3e [file] [log] [blame]
#!/bin/sh
WINSCOPE_SRC_PATTERN="tools/winscope/"
match=false
for file in "$@"
do
if echo $file | grep --quiet "$WINSCOPE_SRC_PATTERN"
then
match=true
fi
done
# If there are changes to winscope files and npm is installed
if $match && (which node > /dev/null)
then
echo "Running winscope presubmit tests..."
npm run test:presubmit --prefix $WINSCOPE_SRC_PATTERN
fi