File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Sample pre-push hook. NOT auto-installed (git hooks live in .git/hooks, which is
3+ # not version-controlled). To use it:
4+ # ln -s ../../scripts/hooks/pre-push .git/hooks/pre-push
5+ # It runs the local verification gate and blocks the push on failure.
6+ set -euo pipefail
7+ exec " $( git rev-parse --show-toplevel) /scripts/verify.sh"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # One-command local verification gate. Runs ONLY the JVM-safe checks allowed for
3+ # local runs (format, compile, unit tests). Never assembles an APK (that is
4+ # Namespace/Depot only). Always stops the Gradle daemon at the end.
5+ #
6+ # Optional pre-push hook install (manual, not auto-wired):
7+ # ln -s ../../scripts/hooks/pre-push .git/hooks/pre-push
8+ set -euo pipefail
9+
10+ cd " $( dirname " $0 " ) /.."
11+
12+ cleanup () { ./gradlew --stop > /dev/null 2>&1 || true ; }
13+ trap cleanup EXIT
14+
15+ echo " >> spotlessKotlinCheck"
16+ ./gradlew spotlessKotlinCheck
17+
18+ echo " >> compileOssDebugKotlin"
19+ ./gradlew :app:compileOssDebugKotlin
20+
21+ echo " >> testOssDebugUnitTest"
22+ ./gradlew :app:testOssDebugUnitTest
23+
24+ echo " OK: local verification passed."
You can’t perform that action at this time.
0 commit comments