Commit e5d584b8 authored by Sam Saccone's avatar Sam Saccone

tests: Handle when no changes to examples

parent ca297253
...@@ -20,7 +20,14 @@ else ...@@ -20,7 +20,14 @@ else
git fetch current && \ git fetch current && \
cd browser-tests/ && \ cd browser-tests/ && \
npm i && \ npm i && \
git diff HEAD current/master --name-only | awk 'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}' | uniq | grep -v \/\/ | grep examples | awk -F '[/]' '{print "--framework=" $2}' | xargs npm run test -- changes=$(git diff HEAD origin/master --name-only | awk 'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}' | uniq | grep -v \/\/ | grep examples | awk -F '[/]' '{print "--framework=" $2}')
if [ "${#changes}" = 0 ]
then
exit 0
else
echo changes | xargs npm run test --
fi
exit $? exit $?
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment