Skip to content

Commit a80d9aa

Browse files
feat(cli): style the ASCII banner with CodSpeed orange
Render the logo in bold CodSpeed orange (#FF8700) with a dim separator line and styled version tag below. Output via eprintln (stderr) for consistency with other UI output. Cherry-picked-from: f3daff5
1 parent f4d85a8 commit a80d9aa

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

src/cli/shared.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
use crate::VERSION;
22
use crate::executor::config::SimulationTool;
3+
use crate::local_logger::CODSPEED_U8_COLOR_CODE;
34
use crate::prelude::*;
45
use crate::run_environment::interfaces::RepositoryProvider;
56
use crate::runner_mode::{RunnerMode, load_shell_session_mode};
67
use clap::Args;
78
use clap::ValueEnum;
9+
use console::style;
810
use std::path::PathBuf;
911

1012
pub(crate) fn show_banner() {
11-
let banner = format!(
12-
r#"
13-
______ __ _____ __
13+
let logo = r#" ______ __ _____ __
1414
/ ____/____ ____/ // ___/ ____ ___ ___ ____/ /
1515
/ / / __ \ / __ / \__ \ / __ \ / _ \ / _ \ / __ /
1616
/ /___ / /_/ // /_/ / ___/ // /_/ // __// __// /_/ /
1717
\____/ \____/ \__,_/ /____// .___/ \___/ \___/ \__,_/
18-
https://codspeed.io /_/ runner v{VERSION}
19-
"#
20-
);
21-
println!("{banner}");
18+
/_/"#;
19+
20+
let version_tag = style(format!("v{VERSION}")).bold();
21+
let url = style("codspeed.io").color256(CODSPEED_U8_COLOR_CODE);
22+
let separator = style("─".repeat(52)).dim();
23+
24+
eprintln!();
25+
eprintln!("{}", style(logo).color256(CODSPEED_U8_COLOR_CODE).bold());
26+
eprintln!(" {separator}");
27+
eprintln!(" {url} {version_tag}");
28+
eprintln!();
2229
debug!("codspeed v{VERSION}");
2330
}
2431

0 commit comments

Comments
 (0)