chore: add pre-push preflight + setup-hooks

Four-block pre-push gate matching the HellionChat pattern:

- Block A (verify-version-consistency.sh): csproj <Version> vs
  repo.json AssemblyVersion / TestingAssemblyVersion / DownloadLink*
  tag presence. Tolerant of repo.json being absent so v0.1.0 (which
  has no public release manifest yet) does not fail at push time;
  the missing-file path turns into the full cross-check once repo.json
  lands.
- Block B: dotnet build Anvil.sln -p:Platform=x64 -c Release. Platform
  pin is forge-wide (Forgeimizer v0.1.0 lesson: solution build defaults
  drift to AnyCPU otherwise).
- Block C: dotnet csharpier check ./Anvil. Catches the accumulated
  formatter drift that hit HellionChat v1.5.6 (12 files) when only
  build was checked per task.
- Block D: markdownlint-cli2 over the repo's *.md files (excludes node_modules,
  bin, obj, .claude, CLAUDE.md).

Plus setup-hooks.sh as the one-shot installer that points
core.hooksPath at .githooks/ and chmods the scripts.

README.md: MD040 fix for the custom-repo URL fence (added text language tag).
This commit is contained in:
2026-05-27 22:25:35 +02:00
parent 90803bcd3c
commit d8efc213e3
5 changed files with 95 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# setup-hooks.sh — wire the local .githooks/ directory into core.hooksPath.
# Run once after cloning the repo. Idempotent; safe to re-run on every pull.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
git config core.hooksPath .githooks
chmod +x .githooks/pre-push
chmod +x scripts/*.sh
echo "setup-hooks: core.hooksPath -> .githooks (pre-push wired)"