Skip to content

Instantly share code, notes, and snippets.

@marioosh
Created December 23, 2014 09:21
Show Gist options
  • Save marioosh/42ed2d006275670b944c to your computer and use it in GitHub Desktop.
Save marioosh/42ed2d006275670b944c to your computer and use it in GitHub Desktop.
executing test before push to remote server
#!/bin/bash
CMD="sbt clean cleanFiles test"
echo ""
echo ">> You do not pass if any from tests will fail"
echo ""
$CMD
RESULT=$?
if [$RESULT -ne 0 ]; then
echo ""
echo ""
echo ">> At least one test failed"
echo ">> to force push use command: git push --no-verify"
echo ""
exit 1
fi
exit 0 # //push continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment