/rhiza:release¶
Prepare a release for the current rhiza-managed repo — locally. Bumps the version, bumps any self-referencing workflow-stub pins, regenerates the changelog, commits, and tags, then stops so you review before pushing.
With no argument the next version is derived from the conventional commits
since the last tag; pass an explicit vX.Y.Z to override.
What it does¶
- Preconditions — confirms the repo is rhiza-managed, the working tree is
clean, you're on the default branch (asks if not), and
uvxis available; fetches tags. - Current version — reads
[project].versionfrompyproject.toml. - Next version —
uvx git-cliff --bumped-versioncomputes the bump (feat→ minor,fix→ patch, breaking → major); you confirm or override. Guards that the target strictly increases past every previous release — the highest existing tag and the currentpyproject.tomlversion, compared as semver — and refuses to reuse an existing tag. - Preview — shows the release notes (
git-cliff --unreleased --tag) before writing anything; stops if there's nothing new since the last tag. - Bump — sets the
pyproject.tomlversion (skipped for dynamic versions). - Workflow pins — bumps any self-referencing workflow-stub pins
(
uses: <this-repo>/…@vX.Y.Z) to the new tag, so the template repo's own stubs move with the release. A no-op for downstream repos (their stubs point atjebel-quant/rhiza, not at themselves). - Changelog — rewrites
CHANGELOG.mdwith the unreleased commits folded under the new tag. - Commit + tag —
chore: release vX.Y.Zand a matching local tag. - Stops before pushing — prints the
git pushcommands. Pushing the tag is what triggers the repo'sReleaseworkflow to publish.
Notes¶
- Never pushes and never force-tags. Everything it does is a local commit and
tag you can undo (
git tag -d …,git reset --hard HEAD~1). - Meant for a rhiza-managed application, not this plugin repo (which releases
via
make release VERSION=vX.Y.Z). - Needs
uvxforgit-cliff; nogh/glabrequired to prepare — only to publish manually if the repo has no release workflow.