Skip to content

Instantly share code, notes, and snippets.

View david-m-globant's full-sized avatar
🎯
Focusing

david-m-globant

🎯
Focusing
View GitHub Profile
@hdznrrd
hdznrrd / pre-push.sh
Created June 20, 2016 11:37
git pre-push hook running build & tests using maven and only pushing if tests succeeded
#!/bin/sh
# git pre-push hook running build & tests using maven and only pushing if tests succeeded
#
# will do a local check-out of your currentl commit state and see if that one builds.
# this will spare you nasty surprises from missing to add files or having broken partially commited files
#
PWD=$(pwd)
ROOT="file://$(git rev-parse --show-toplevel)"
TMP=$(mktemp -d)