diff options
| author | Danilo M. <danix@danix.xyz> | 2026-03-31 12:19:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-03-31 12:19:56 +0200 |
| commit | 59d70bd5f0418205f97426dd6d400adc68e91082 (patch) | |
| tree | 8a3268615cdc0630f8999c769dd576b2f0640799 /CLAUDE.md | |
| parent | d3b865ccf522114746b51ac483cd5c856512310a (diff) | |
| download | my-slackbuilds-59d70bd5f0418205f97426dd6d400adc68e91082.tar.gz my-slackbuilds-59d70bd5f0418205f97426dd6d400adc68e91082.zip | |
hooks: add pre-commit and post-commit hooks to version control
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -98,14 +98,20 @@ Source: https://slackware.uk/~urchlay/repos/sbo-maintainer-tools ### Git hook setup -Install the pre-commit hook into this repo: +Both hooks are tracked in the `hooks/` directory. Install them after cloning: ```bash -cp /usr/doc/sbo-maintainer-tools-0.9.3/pre-commit-sbolint .git/hooks/pre-commit -chmod +x .git/hooks/pre-commit +cp hooks/pre-commit .git/hooks/pre-commit +cp hooks/post-commit .git/hooks/post-commit +chmod +x .git/hooks/pre-commit .git/hooks/post-commit ``` -To bypass it in exceptional cases: +| Hook | Trigger | Purpose | +|------|---------|---------| +| `pre-commit` | Before every commit | Runs `sbolint` on staged packages; blocks commit on errors | +| `post-commit` | After every commit | Offers to create a `SBo/<pkg>.tar.gz` archive for submission | + +To bypass the pre-commit lint check in exceptional cases: ```bash SBOLINT=no git commit -m'Message here' ``` |
