Summary
A standalone semrel changelog subcommand that generates or updates the project changelog from unreleased commits without performing a full release.
Motivation
There are common workflows where only the changelog needs to be refreshed:
- Previewing what the next release notes would look like in a PR
- Maintaining a
CHANGELOG.md that's committed to the repo continuously (not just at release time)
- Generating release notes for a draft PR description
Currently this requires running semrel release --dry-run and manually extracting the changelog output.
Proposed CLI
# Preview to stdout
semrel changelog
# Write/update CHANGELOG.md in place
semrel changelog --write
# Output in a specific format
semrel changelog --format markdown
semrel changelog --format json
# Limit to last N releases
semrel changelog --since v1.0.0
Behaviour
- Uses the same generator plugins already configured in
.semrel.yaml
- Respects
SEMREL_PLUGIN_TEMPLATE and other generator env-vars
- Does not create tags, push anything or invoke provider/hook plugins
- Exit code 0 when unreleased commits are found, exit 2 when there is nothing to release (same as dry-run)
Acceptance criteria
Summary
A standalone
semrel changelogsubcommand that generates or updates the project changelog from unreleased commits without performing a full release.Motivation
There are common workflows where only the changelog needs to be refreshed:
CHANGELOG.mdthat's committed to the repo continuously (not just at release time)Currently this requires running
semrel release --dry-runand manually extracting the changelog output.Proposed CLI
Behaviour
.semrel.yamlSEMREL_PLUGIN_TEMPLATEand other generator env-varsAcceptance criteria
semrel changelogcommand implemented--writeflag updates the file in-place (prepend to existingCHANGELOG.md)