Expand description
The engine-owned version-bump arithmetic (release-rust-workspace-multicrate
facet 2).
shipshape release plan --bump major|minor|patch supplies only a semantic level;
the engine computes the new version from the current manifest version — there
is no hand-typed literal version (--version was removed in 0.3.0,
release-drop-version-flag, and stays removed). This module is the pure,
side-effect-free core of that computation: parse a strict X.Y.Z version and
apply a BumpLevel. It fails closed on a non-semver manifest version rather
than guess, so a malformed version aborts release plan instead of publishing an
unintended number.
The bump is strict MAJOR.MINOR.PATCH (three non-negative integers): a
pre-release or build-metadata version (1.2.3-rc.1, 1.2.3+build) is refused —
bumping such a version is ambiguous, and a release cut publishes a plain release
version, so refusing is the safe, unsurprising behaviour.
Structs§
- Bump
Error - Why an engine-owned bump plan could not be built. This covers an invalid source version and plan-time edit-set conflicts such as non-equivalent workspace pins; both refuse before an approval artifact is sealed.
Enums§
- Bump
Edit Error - Why a cut-time bump edit could not be applied to a file’s text. Each variant is a fail-closed refusal — the executor aborts the cut rather than commit a wrong edit.
Functions§
- bump_
version - Compute the next version by applying
levelto a strictX.Y.Zcurrentversion. - finalize_
changelog - Finalize a Keep-a-Changelog CHANGELOG: promote the
## [Unreleased]section’s content under a new dated## [<version>] - <date>header, leaving a fresh empty## [Unreleased]above it for the next cycle. Returns the new text. - finalize_
marker_ changelog - Finalize a marker-owned changelog region without allowing the released section or
marker comments to enter the release notes.
compiled_notescontains any fragment and trailer-derived material gathered by the effectful executor. - package_
version - The root
[package]version = "…"value, orNonewhen the table or its version line is absent. - rewrite_
pin - Rewrite a single intra-workspace
=-pin (dependency = "…, version = \"<from>\"") fromfromtoto, returning the new manifest text. - rewrite_
workspace_ pin - Rewrite an exact internal pin owned by the root
[workspace.dependencies]table. - root_
manifest_ version - The release version source in a root Cargo manifest. A workspace package version is
authoritative when present; otherwise a plain single-crate
[package]version is used. This is deliberately a shape check, not a best-effort search across tables. - set_
package_ version - Rewrite the root
[package]version = "<from>"line toto, preserving the line’s formatting and failing closed when the sealed source version is absent. - set_
workspace_ version - Rewrite the
[workspace.package]version = "<from>"line toto, returning the new manifest text. - workspace_
version - The
[workspace.package]version = "…"value, orNonewhen the section or itsversionline is absent.