Skip to content

Instantly share code, notes, and snippets.

@alinetskyi
Created August 24, 2020 09:59
Show Gist options
  • Save alinetskyi/85f399e99b82bdf507eade69fd2444d2 to your computer and use it in GitHub Desktop.
Save alinetskyi/85f399e99b82bdf507eade69fd2444d2 to your computer and use it in GitHub Desktop.
#!/bin/sh
# To use add to `.git/hooks/`
# Should be named `pre-push`
# Make executable with `chmod +x`
flutter analyze
RESULT=$?
if [ $RESULT -eq 0 ]; then
echo success
else
echo "Fix your problems man!"
exit 1
fi
flutter test --coverage
RESULT=$?
if [ $RESULT -eq 0 ]; then
echo success
else
echo "Fix your problems man!"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment