Document that ./gradlew check must pass before every commit. Add scripts to run the same verification as CI and optionally install a git hook. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
437 B
Bash
Executable file
15 lines
437 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Symlinks scripts/pre-commit-check.sh into .git/hooks/pre-commit
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
HOOK="$ROOT/.git/hooks/pre-commit"
|
|
CHECK="$ROOT/scripts/pre-commit-check.sh"
|
|
|
|
chmod +x "$CHECK"
|
|
ln -sf "../../scripts/pre-commit-check.sh" "$HOOK"
|
|
chmod +x "$HOOK"
|
|
|
|
echo "Installed pre-commit hook -> scripts/pre-commit-check.sh"
|
|
echo "Every commit will run: ./gradlew check"
|