rlsbl v0.92.0 /rlsbl.commands.release.release_state
On this page

Release state file: persistence for idempotent release flow.

#rlsbl.commands.release.release_state

#rlsbl.commands.release.release_state

Release state file: persistence for idempotent release flow.

Tracks which mutating steps have completed so that a failed release can be resumed without re-executing already-done work. The state file lives at .rlsbl/releases/in-progress.json and is written at the start of the mutating phase, deleted on success, and left in place on failure.

#get_state_path

python
def get_state_path(project_dir: str) -> str

Return the path to the release state file.

#save_release_state

python
def save_release_state(state_path: str, state_dict: dict) -> None

Atomically write the release state dict to disk (tmp + os.replace).

#load_release_state

python
def load_release_state(state_path: str) -> dict | None

Read and parse the release state file. Returns None if missing.

#save_step

python
def save_step(state_path: str, step_name: str) -> None

Record a completed step: load, append to completed_steps, save.

#clear_release_state

python
def clear_release_state(state_path: str) -> None

Delete the state file and its parent dir if empty (no-op if already absent).