Repository navigation
chore(release): one changelog hook, with the full history - #362
Merged
Merged
Conversation
`cargo release` left the worktree dirty and wrote empty changelogs: - release.toml set a workspace-wide pre-release-hook. cargo-release runs it once per crate from that crate's directory, so `git cliff -o CHANGELOG.md` wrote a stray CHANGELOG.md into bin/tx3c, crates/tx3-cardano, and crates/tx3-resolver. The release commit only stages tracked files, so they were left behind untracked. - git-cliff 2.10.1 run inside this git submodule limits itself to a wrongly resolved "current directory" path and drops every commit, so the 0.23.0 and 0.24.0 sections came out empty. git-cliff 2.14.2 fixes this (orhun/git-cliff#1627). Keep the single hook in crates/tx3-lang, which writes the root CHANGELOG.md, and pass `--include-path '**/*'` so older git-cliff versions produce the full history too. The tag argument now carries the `v` prefix, matching `tag-name`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.24.0 release left the worktree dirty and wrote an empty changelog section. This PR fixes both for future releases.
release.tomlset a workspace-widepre-release-hook. cargo-release runs it once per crate, from that crate's directory, sogit cliff -o CHANGELOG.mdwrote untrackedCHANGELOG.mdfiles intobin/tx3c,crates/tx3-cardanoandcrates/tx3-resolver. The workspace hook is removed. The single hook incrates/tx3-langwrites the rootCHANGELOG.md.--include-path '**/*', so older versions produce the full history too.--tagnow uses thevprefix, matchingtag-name = "v{{version}}".Verification
I ran the new hook exactly as cargo-release would, from
crates/tx3-langwithWORKSPACE_ROOTset:CHANGELOG.md.CHANGELOG.md.cargo release configshows no workspace hook, andcargo metadataparses.🤖 Generated with Claude Code