Created
October 22, 2018 14:03
-
-
Save micvbang/4c8cb1f24cfe04d1a0dfab010eb851d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BUILD_OUTPUT=$(go build ./... 2>&1) | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo "$BUILD_OUTPUT" | |
echo -e "\nErrors during compilation. Please fix before committing." | |
exit 1 | |
fi | |
TEST_OUTPUT=$(go test ./... 2>&1) | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo "$TEST_OUTPUT" | |
echo -e "\nErrors during testing. Please fix before committing." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the extension (only used for syntax highlighting)