Add scripts

This commit is contained in:
Christian Pauly 2019-06-09 12:21:46 +02:00
parent 3972d14de3
commit 3e75ecac22
2 changed files with 28 additions and 0 deletions

17
scripts/coverage.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
if [ -d "coverage" ]
then
ls -A ./coverage
if [ -z "$(ls -A ./coverage)" ]; then
exit 0
else
if [ -f "coverage/lcov.info" ]
then
genhtml -o coverage coverage/lcov.info || exit 0
else
exit 0
fi
fi
else
exit 0
fi

11
scripts/test.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
if [ -d test ]
then
if [ -z "$(ls -A test)" ]; then
exit 0
else
flutter test --coverage
fi
else
exit 0
fi