Files
amethyst/.git-hooks/pre-push
T
Vitor Pamplona 710f15f790 - Fixes copyright using KDoc patterns instead of simpler comments
- Moves spotless and git-hooks to hidden folders
2026-02-09 13:06:41 -05:00

29 lines
702 B
Bash
Executable File

#!/bin/bash
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
echo "*********************************************************"
echo "Running git pre-push hook."
echo "*********************************************************"
echo ""
echo "Java Version: "
echo "$JAVA_HOME"
echo "$(java -version)"
echo "Running test... "
./gradlew test
status=$?
if [ "$status" = 0 ] ; then
echo "All test passed."
exit 0
else
echo "*********************************************************"
echo 1>&2 "Failing test"
printf "Run ${GREEN}./gradlew test${NO_COLOR} to make sure you have all tests green before pushing...\n"
echo "*********************************************************"
exit 1
fi