Skip to main content

Module release_engine

Module release_engine 

Source
Expand description

The release engine: rk release request, rk release build, and rk release publish, for each driver that has an adapter, on GitHub and GitLab.

The engine reads every fact it acts on from the landing record: the driver, the forge, the repository, the trunk, the style, the integration, the line prefix, and the registry answer. It takes no flag that restates one. The judgments are pure and live in guard; the actions read, judge, and write through the driver adapter, the pinned cliff, and the forge CLIs in forge. Each action returns its report, and the handler in src/commands/release.rs renders it.

Modules§

adapter
The driver adapters: the one owner of where each driver keeps its version, how the version is spelled, how it is written, and how the release artifacts build.
build
rk release build: decide whether this push releases, and build it.
cliff
The git-cliff calls: the bumped version, the changelog, and the notes.
forge
The forge reads and writes of the release engine, through gh and glab, the clients rk release status reads through.
guard
The engine’s judgments, pure.
publish
rk release publish: put the built and attested release on the forge, and create the tag last.
request
rk release request: keep the one release request of the pushed base.

Structs§

Context
Everything the record answers for one engine run.
Done
What one action returns: its report, the human lines, and the next steps, rendered by the handler.

Constants§

BUILD_REPORT
The build report inside OUT_DIR, which rk release publish reads.
CHECKSUMS
The checksum file inside OUT_DIR, one <sha256> <name> per artifact.
NOTES
The release notes inside OUT_DIR.
OUT_DIR
The directory the build writes its report, its notes, and its checksums into, beside dist/ and never inside it, because a registry upload sends every file dist/ holds.
RECOVERY_DEFECTIVE
The recovery section for bytes that differ from what already shipped.
RECOVERY_TAG
The recovery section for a tag at another commit, or one nobody could read.
REQUEST_PREFIX
The branch prefix of the engine’s one release request per base: the request for <base> lives on rk-release/<base>.

Functions§

conflict
A conflict with what the forge or the registry already holds, named with its recovery section.
default_ci_token
The default CI token’s variable, where the credential the forge CLI would push with is that token alone.
file_name
The file name of a path.
file_sha256
The SHA-256 of a file, as lowercase hex.
forge_text
An embedded forge text with its tokens replaced.
git
Run one git command against root, with the hook and identity variables scrubbed.
git_line
The trimmed output of one git command that must succeed.
git_ok
Run one git command that must succeed, with its failure typed.
is_line
Whether branch is a release line <prefix><major>.<minor> under prefix.
last_line
The last non-empty line of a tool’s output.
push
Push to origin with the bot credential the job sets.
request_branch
The request branch for a base.