You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
380 B

#!/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