Skip to main content

zoi_cli/cmd/
version.rs

1//! Logic for the `version` command.
2
3use colored::Colorize;
4
5use crate::utils;
6
7/// Run the version command.
8pub fn run(branch: &str, status: &str, number: &str, commit: &str) {
9    println!("{} Zoi version information", "::".bold().blue());
10    // - Print the ZFVM identifier, not the long-form name. `branch` is one of
11    // - Prod/Dev/Spec/Pub, and reporting "Development" here contradicted
12    // - `zoi about`, which renders the same fields through
13    // - `format_version_summary`. Both now agree.
14    utils::print_info("Branch", branch);
15    utils::print_info("Status", status);
16    utils::print_info("Number", number);
17    utils::print_info("Commit", commit.green());
18}