13 lines
668 B
PowerShell
13 lines
668 B
PowerShell
# Configures core.hooksPath to scripts/git-hooks (pre-commit + pre-push).
|
|
# Run from repo root: pwsh -File scripts/install-git-hooks.ps1
|
|
$ErrorActionPreference = "Stop"
|
|
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
|
Set-Location $repoRoot
|
|
git config core.hooksPath scripts/git-hooks
|
|
Write-Host "Configured core.hooksPath=scripts/git-hooks (pre-commit + pre-push)"
|
|
Write-Host "Pre-push runs gdlint/gdformat when client/scripts or client/test .gd files change in the push."
|
|
Write-Host ""
|
|
Write-Host "Install gdtoolkit (required when pushing GDScript changes):"
|
|
Write-Host " python -m venv .venv-gd"
|
|
Write-Host " .venv-gd/Scripts/pip install `"gdtoolkit==4.5.0`""
|