Skip to main content

zoi_cli/cmd/
upgrade.rs

1use crate::pkg;
2use anyhow::Result;
3use colored::*;
4
5pub fn run(
6    branch: &str,
7    status: &str,
8    number: &str,
9    force: bool,
10    tag: Option<String>,
11    custom_branch: Option<String>,
12) -> Result<()> {
13    println!("{} Upgrading Zoi...", "::".bold().blue());
14
15    match pkg::upgrade::run(branch, status, number, force, tag, custom_branch) {
16        Ok(()) => {}
17        Err(e) if e.to_string() == "already_on_latest" => {}
18        Err(e) => return Err(e),
19    }
20    Ok(())
21}