Skip to main content

contract_cli/commands/
update.rs

1use crate::error::Result;
2use crate::output::{print_success, Ctx};
3
4#[derive(serde::Serialize)]
5struct Out {
6    current: String,
7    note: String,
8}
9
10pub fn run(ctx: Ctx, _check: bool) -> Result<()> {
11    // Placeholder. Real updater (brew tap / cargo install --force) lives in the
12    // release pipeline; this command just reports the current version so the
13    // CLI surface matches the rest of the suite.
14    let out = Out {
15        current: env!("CARGO_PKG_VERSION").to_string(),
16        note: "Self-update will run via Homebrew (brew upgrade contract-cli) or cargo install --force contract-cli once published.".into(),
17    };
18    print_success(ctx, &out, |o| {
19        println!("contract-cli v{} — {}", o.current, o.note);
20    });
21    Ok(())
22}