cursor Init 完善多人协同changelog,以及godot相关基础skill和代码规范
This commit is contained in:
18
.cursor/changelog/tools/install-git-hooks.ps1
Normal file
18
.cursor/changelog/tools/install-git-hooks.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
# install-git-hooks.ps1 - install changelog pre-commit / post-merge git hooks into this repo.
|
||||
# Git hooks are not distributed with the repo; run this once per clone (idempotent).
|
||||
# Usage: powershell -ExecutionPolicy Bypass -File .cursor/changelog/tools/install-git-hooks.ps1
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$hooksDir = (git rev-parse --git-path hooks 2>$null)
|
||||
if (-not $hooksDir) { Write-Error "not inside a git repository"; exit 1 }
|
||||
if (-not (Test-Path $hooksDir)) { New-Item -ItemType Directory -Force -Path $hooksDir | Out-Null }
|
||||
|
||||
$src = Join-Path $PSScriptRoot "git-hooks"
|
||||
foreach ($name in @("pre-commit", "post-merge")) {
|
||||
$from = Join-Path $src $name
|
||||
$to = Join-Path $hooksDir $name
|
||||
Copy-Item -Force $from $to
|
||||
Write-Output "installed: $to"
|
||||
}
|
||||
Write-Output "done. git hooks installed (pre-commit rebuilds + stages views, post-merge rebuilds after merge)."
|
||||
Reference in New Issue
Block a user