scripts/pre-push-hook: skip checks when deleting a branch

This commit is contained in:
Harsh Shandilya 2021-11-01 11:11:53 +05:30
parent 26f99a254f
commit 494cb5fc4f
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -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