cli/commands/build_info/
mod.rs1use node::BuildEnv;
2
3#[derive(Debug, clap::Args)]
5pub struct Command;
6
7impl Command {
8 pub fn run(&self) -> anyhow::Result<()> {
9 let build_env = BuildEnv::get();
10 println!(
11 r#"
12Version: {}
13Build time: {}
14Commit SHA: {}
15Commit time: {}
16Commit branch: {}
17Rustc channel: {}
18Rustc version: {}
19"#,
20 build_env.version,
21 build_env.time,
22 build_env.git.commit_hash,
23 build_env.git.commit_time,
24 build_env.git.branch,
25 build_env.rustc.channel,
26 build_env.rustc.version,
27 );
28 Ok(())
29 }
30}