From 0341fc2201c17b53c87cd45ee77057cafece1370 Mon Sep 17 00:00:00 2001 From: Andrii Arsenin Date: Thu, 1 Oct 2026 12:04:43 +0300 Subject: [PATCH] docs(claude): tag version commits with their changelog entry - add a step to tag each version-bump commit as v, annotated with that version's changelog entry verbatim - push tags with git push --follow-tags --- CLAUDE.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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.