From df764932f7fdddea9cea5937c6053a95797d35df Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 21 Oct 2022 12:02:23 +0530 Subject: Migrate to Metalava for validating API (#2195) --- scripts/pre-push-hook.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/pre-push-hook.sh') diff --git a/scripts/pre-push-hook.sh b/scripts/pre-push-hook.sh index 9cfbc9e1..6580b9c7 100644 --- a/scripts/pre-push-hook.sh +++ b/scripts/pre-push-hook.sh @@ -7,8 +7,12 @@ set -o pipefail ZERO="0000000000000000000000000000000000000000" GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}" -while read local_ref local_oid remote_ref remote_oid; do +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}" apiCheck detekt spotlessCheck test -PslimTests + "${GRADLE_EXEC}" metalavaCheckCompatibilityRelease detekt spotlessCheck test -PslimTests fi done -- cgit v1.2.3