diff --git a/CLAUDE.md b/CLAUDE.md index 93e7989..fa10934 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -53,4 +53,13 @@ When asked to commit: 4. Add a `## - ` entry at the top of `CHANGELOG.md` ("Changes since :", then `### Added` / `### Changed` / `### Fixed`). Mark breaking changes with **Breaking:**. 5. Update the docs affected by the change (`docs/*.md`, `README.md`, `.env.example`, MCP tool descriptions). 6. Build the commit message with the `/git-commit` skill if it is available, following its format and rules. Otherwise use a conventional commit message (`type(scope): subject`, then a bullet list body). Either way, put the version bump in the body as a bullet (e.g. `- bump version to `), not in the subject line. This overrides the skill's rule of putting versions in the subject. Then make the commit with that message. -7. **After committing, ask the user whether to rebuild and restart the docker compose containers** (`docker compose up -d --build`); don't do it without confirmation. +7. **Tag the version commit** with an annotated tag `v` whose message is that version's `CHANGELOG.md` entry, verbatim (from its `## ` heading up to the next version's heading). Commits without a version bump get no tag. `--cleanup=whitespace` is required: the default cleanup strips lines starting with `#`, which would drop the entry's headings: + + ```bash + v= + awk -v v="$v" 'index($0, "## " v " ") == 1 {p = 1; print; next} p && /^## / {exit} p' CHANGELOG.md \ + | git tag -a "v$v" --cleanup=whitespace -F - + ``` + + Don't push the tag; tell the user to push with `git push --follow-tags`, which also pushes annotated tags. +8. **After committing, ask the user whether to rebuild and restart the docker compose containers** (`docker compose up -d --build`); don't do it without confirmation.