From c7fdd913c599805a92c29a7d1ddd57140e182b6e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 8 Oct 2021 10:38:09 +0530 Subject: Add `installGitHooks` task for pre-push Git hooks (#1516) * build: add a pre-push task and Gradle task to install it * Document `installGitHooks` in contributing.md --- scripts/pre-push-hook.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/pre-push-hook.sh (limited to 'scripts/pre-push-hook.sh') diff --git a/scripts/pre-push-hook.sh b/scripts/pre-push-hook.sh new file mode 100644 index 00000000..78dafecb --- /dev/null +++ b/scripts/pre-push-hook.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}" + +"${GRADLE_EXEC}" spotlessCheck apiCheck -- cgit v1.2.3