On this page
Release command group: orchestrates version bumps, changelog validation, hook execution, selfdoc regeneration, tagging, pushing, and GitHub Releases.
#rlsbl.commands.release
#rlsbl.commands.release
Release command: bumps version, validates changelog, runs hooks, regenerates selfdoc, syncs lockfiles, tags, pushes, and creates a GitHub Release.
#_resolve_git_root
def _resolve_git_root(cwd)The git work-tree root for cwd, or None when git cannot answer.
Goes through effects.run directly rather than the release flow's late-bound run: this is bookkeeping the mutating phase is handed, and it must never consume a mock side effect or shift a call sequence in tests that stub the release's git calls (same rationale as head_sha).
#_format_preflight_summary
def _format_preflight_summary(results, *, label='Preflight')Format a one-line positive confirmation of the checks that passed.
results is an iterable of objects exposing .name and .status (CheckRunResult from strictcli, or the external-check results). Only checks that actually ran and passed (status == "pass") are listed -- skipped and (impossible-at-success) failed checks are excluded.
Returns the summary string, or None when no check passed so the caller can suppress an empty line. label distinguishes concurrent preflight runs (e.g. the changelog sub-run) so two identical lines never appear.
#run_cmd
def run_cmd(release_config: 'ReleaseConfig', flags: dict | None=None, *, ctx)Release command handler.
Accepts a ReleaseConfig instance (from the release file) and an optional flags dict. Bumps version, commits, pushes, and creates a GitHub Release.
ctx: ProjectContext carrying project_root, monorepo_root, and config.
#resume_cmd
def resume_cmd(saved_state: dict, flags: dict | None=None, *, ctx)Resume a previously failed release from the mutating phase.
Reads the saved state dict (from in-progress.json), resolves just enough context to call _run_release_mutating directly, skipping all validation and pre-release hooks (which already ran successfully in the original run).
#_resume_cmd_inner
def _resume_cmd_inner(saved_state, flags, *, ctx)Inner implementation of resume_cmd.
#_run_cmd_inner
def _run_cmd_inner(release_config, flags, *, ctx)Inner implementation of run_cmd. Raises exceptions instead of sys.exit.