diff options
Diffstat (limited to 'scripts/pre-push-hook.sh')
-rw-r--r-- | scripts/pre-push-hook.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/pre-push-hook.sh b/scripts/pre-push-hook.sh index 78dafecb..e9b29f92 100644 --- a/scripts/pre-push-hook.sh +++ b/scripts/pre-push-hook.sh @@ -4,6 +4,11 @@ set -e set -u set -o pipefail +ZERO=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0') GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}" -"${GRADLE_EXEC}" spotlessCheck apiCheck +while read local_ref local_oid remote_ref remote_oid; do + if [ "${local_oid}" != "${ZERO}" ]; then + "${GRADLE_EXEC}" spotlessCheck apiCheck + fi +done |