From 1fb8e2b10f2957910080f8c5276f4df3a86c2399 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 25 Jun 2026 17:44:05 +0200 Subject: docs: document git hooks and SBO_ARCHIVE usage Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index 8e29936..81fda40 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -186,6 +186,35 @@ git commit -m': add version X.Y.Z' --- +## Git Hooks + +Versioned source lives in `.extras/hooks/`. They are NOT auto-installed +(git ignores `.git/hooks/` only if `core.hooksPath` is unset; the user's +global `core.hooksPath` dispatches to `.git/hooks/` when executable). +After a fresh clone, install them: + +```bash +cp .extras/hooks/* .git/hooks/ && chmod 0755 .git/hooks/{pre,post}-commit +``` + +- `pre-commit` — runs `sbolint` on each changed package; aborts the commit on + any error. Also auto-removes staged source-archive symlinks and blocks + staged regular source archives (`*.tar.*`, `*.zip`, `*.deb`, etc.). Skip + with `SBOLINT=no git commit ...`. +- `post-commit` — for each added/updated `*.SlackBuild`, offers to build the + SBo submission tarball into `SBo/.tar.gz`. + +### `SBO_ARCHIVE` (non-interactive archive answer) + +`post-commit` normally prompts on a TTY. To answer without one (agents, +scripts), set `SBO_ARCHIVE`: + +- `SBO_ARCHIVE=yes git commit ...` — build the tarball, no prompt +- `SBO_ARCHIVE=no git commit ...` — skip, no prompt +- unset + TTY → interactive prompt; unset + no TTY → skip + +--- + ## Commit Conventions - One commit per package add/update -- cgit v1.2.3