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
This commit is contained in:
Harsh Shandilya 2021-10-08 10:38:09 +05:30 committed by GitHub
parent 62d78dd52a
commit c7fdd913c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 0 deletions

9
scripts/pre-push-hook.sh Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
GRADLE_EXEC="${GRADLE_EXEC:-./gradlew}"
"${GRADLE_EXEC}" spotlessCheck apiCheck