aboutsummaryrefslogtreecommitdiff
path: root/scripts/pre-push-hook.sh
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-10-08 10:38:09 +0530
committerGitHub <noreply@github.com>2021-10-08 10:38:09 +0530
commitc7fdd913c599805a92c29a7d1ddd57140e182b6e (patch)
tree05287fb53feeae9ce6a36a17be57ddd0f43f7c93 /scripts/pre-push-hook.sh
parent62d78dd52a4d2949dcef805bfb0c1c1eef65d623 (diff)
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
Diffstat (limited to 'scripts/pre-push-hook.sh')
-rw-r--r--scripts/pre-push-hook.sh9
1 files changed, 9 insertions, 0 deletions
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