# 提交笔记站源码变更（尊重 .gitignore，不会加入 _publish、dist、PROJECT_BRIEF.local.md 等）
# 用法: .\script\commit-notes.ps1 -m "提交说明"
param(
  [Parameter(Mandatory = $true)]
  [string] $Message
)
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
Set-Location $root

git add docs/.vuepress docs/blog .cursor/rules script/commit-notes.ps1
$staged = @(git diff --cached --name-only)
if ($staged.Count -eq 0) {
  Write-Host "No staged changes."
  exit 0
}
git commit -m $Message
