scripts/pre-push-hook: skip checks when deleting a branch
This commit is contained in:
parent
26f99a254f
commit
494cb5fc4f
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue