18 lines
584 B
Bash
Executable File
18 lines
584 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
repo_root="$(git rev-parse --show-toplevel)"
|
|
cd "$repo_root"
|
|
|
|
hooks_src="$repo_root/scripts/git-hooks"
|
|
chmod +x "$hooks_src/pre-commit" "$hooks_src/pre-push"
|
|
|
|
git config core.hooksPath scripts/git-hooks
|
|
|
|
echo "Configured core.hooksPath=scripts/git-hooks (pre-commit + pre-push)"
|
|
echo "Pre-push runs gdlint/gdformat when client/scripts or client/test .gd files change in the push."
|
|
echo ""
|
|
echo "Install gdtoolkit (required when pushing GDScript changes):"
|
|
echo " python3 -m venv .venv-gd"
|
|
echo " .venv-gd/bin/pip install \"gdtoolkit==4.5.0\""
|