On this page
Scaffold a batch release file with one section per releasable, auto-detecting targets and commenting out releasables with no unreleased commits.
#rlsbl.commands.monorepo.batch_release_init
#rlsbl.commands.monorepo.batch_release_init
Scaffold a batch release file for the workspace's releasables, auto-detecting targets and commenting out releasables with no unreleased commits.
#_handle_existing_batch
def _handle_existing_batch(batch_path)Refuse-unless-pristine for an existing batch release file.
Returns normally (caller should stop) if the file is a still-pristine scaffold (idempotent no-op). Calls sys.exit(1) if any section has been filled in by an operator -- never overwriting operator data.
#_get_unreleased_commit_count
def _get_unreleased_commit_count(proj, workspace_root, all_projects)Return the number of unreleased commits inside a project's scope.
The baseline comes from the project's RELEASE RECORD -- the highest archived release this checkout contains -- and commits since that release are counted when they touch a file proj owns, or (for a releasable member) that releasable's own state directory. Ownership is resolved against all_projects -- the whole member list -- so a file under a nested member counts for that member alone. Returns (count, last_release) where last_release is the version string, or None when nothing is released.
This used to read git tag -l <glob> --sort=-v:refname, which named whatever the tag namespace held rather than what was released.
#_build_pkg_section
def _build_pkg_section(workspace_root, target_names)Build a tomlkit table for a single releasable section.
#_render_commented_section
def _render_commented_section(name, target_names, reason)Render a releasable section as TOML comments.
Returns a string of comment lines (each prefixed with '# ') that represent the section the user would uncomment if they want to include it.
#_collect_releasable_targets
def _collect_releasable_targets(releasable_name, member_projects, workspace_root)Collect targets for a releasable.
Delegates to collect_releasable_targets in rlsbl.targets. Kept as a thin wrapper for backward compatibility with existing callers that import this private name.
#_cmd_batch_release_init
def _cmd_batch_release_init(project_root, releasables=None)Create .rlsbl-monorepo/releases/unreleased.toml.
Scaffolds one [releasables.<name>] section per releasable declared in workspace.toml, skipping non-releasable projects, detecting targets for each, and writing sections with an empty bump/description and the detected include list.
Items with zero unreleased commits are included as commented-out sections.
Args:
project_root: Path to the project root directory.releasables: Optional comma-separated string of releasable names to
include.
#_scaffold_releasable_sections
def _scaffold_releasable_sections(workspace_root, projects, batch_path, filter_names)Scaffold the [releasables.