summaryrefslogtreecommitdiff
path: root/scripts/pre-push-hook.sh
blob: 9cfbc9e1407b597d6157050a3dd8f50164d00547 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

set -e
set -u
set -o pipefail

ZERO="0000000000000000000000000000000000000000"
GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}"

while read local_ref local_oid remote_ref remote_oid; do
  if [ "${local_oid}" != "${ZERO}" ]; then
    "${GRADLE_EXEC}" apiCheck detekt spotlessCheck test -PslimTests
  fi
done