Documentation
¶
Overview ¶
Command changelog assembles the per-change fragments under changelog.d/ into CHANGELOG.md, and checks that they are well-formed (#511). It is adapted from belluikit/govm's scripts/changelog.
Why fragments rather than editing the Unreleased section directly: every change added its entry near the top of that section, so any two open PRs edited the same lines and the second to merge conflicted. Each change now adds a file of its own, and two PRs adding different files cannot conflict. The category is in the file name, so the assembled section has exactly one heading per category in a fixed order.
The repository has two changelogs, each with its own fragments: the toolkit's (CHANGELOG.md, changelog.d/) and the bellui command's, which is its own module with its own tags (cmd/bellui/CHANGELOG.md, cmd/bellui/changelog.d/).
Usage, from anywhere in the repository:
go run ./hack/changelog check # validate both changelogs go run ./hack/changelog preview [-C cmd/bellui] # print the Unreleased section go run ./hack/changelog release [-C cmd/bellui] vX.Y.Z # fold fragments into CHANGELOG.md
release rewrites CHANGELOG.md and deletes the fragments it consumed; run it in the release commit (docs/RELEASING.md, step 1).