Android-Password-Store/scripts/pre-push-hook.sh
Harsh Shandilya 56fd18b17d
feat: rip out Spotless
Spotless' configuration cache support is irritating since it requires you to wipe config cache
every time you initialise a Gradle daemon.
2022-10-29 08:10:44 +05:30

18 lines
484 B
Bash

#!/usr/bin/env bash
set -e
set -u
set -o pipefail
ZERO="0000000000000000000000000000000000000000"
GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}"
while read -r local_ref local_oid remote_ref remote_oid; do
# These useless assignments are to silence warnings from shellcheck about unused variables
_=$local_ref
_=$remote_ref
_=$remote_oid
if [ "${local_oid}" != "${ZERO}" ]; then
"${GRADLE_EXEC}" metalavaCheckCompatibilityRelease detekt ktfmtCheck test -PslimTests
fi
done