cargo-governor 2.0.3

Machine-First, LLM-Ready, CI/CD-Native release automation tool for Rust crates
Documentation
//! Resume command.

use governor_application::release::{ResumeInput, resume};

use crate::cli::{OutputFormat, ResumeOpts};
use crate::error::{CommandExitCode, Result};
use crate::presenter::print_json;
use crate::runtime::checkpoint_store;

pub async fn execute(
    workspace_path: &str,
    opts: ResumeOpts,
    _format: OutputFormat,
) -> Result<CommandExitCode> {
    let started_at = std::time::Instant::now();
    let store = checkpoint_store(workspace_path)?;
    let output = resume(
        &store,
        ResumeInput {
            workspace_path: workspace_path.to_string(),
            checkpoint: opts.checkpoint,
            list: opts.list,
            clean: opts.clean,
        },
    )
    .await?;
    let workspace = output.workspace.clone();
    print_json(
        "release.resume",
        Some(workspace),
        true,
        output,
        started_at,
        Vec::new(),
    )?;
    Ok(CommandExitCode::Success)
}