1use nu_ansi_term::Color;
2
3use crate::{app::AppBuilder, config::env::Env};
4
5const BANNER: &str = r"
6 ⌡
7 __@▓▄ ___
8 ___,p@▒▒░▓▓L ▀▀▀ª ▄▄▄▄▄
9 ⌡▒▒▒▓▒▒░▒▓▓▓▓ ▄█████ ████████_ ██████ ███ª █████████, ▄████████
10_▄▒▓▒▒▓▒▒░▓▓▓▓▓ ▓██▄_ ███~ ~███, ███▀ª~ ███─ ███▓~~▓██N ███▀~~▓██▀
11▄▓▒▓▒▒▓▒▓▓▓▓▓▓█ ~▀███ ███_ _███'▐███ ███ ███ª ▓██N ███▄ _███G
12▓▓▒▓▒▒▓▓▓▓▓▓▓▀ ▀█████▀ ███▀████ª ▐███ ███ ███ ▓██N ~▀███▀███ª
13▓▓▓▓▓▓▓▓▓▓▀ª` ███ ▄▄▄▄▄███
14 ▓▀▀▀ⁿª^ ▀▀▀ ▀▀▀▀▀▀▀~
15";
16
17pub(crate) fn print_banner(app: &AppBuilder) {
18 println!("{BANNER}");
19 println!(
20 " spring: {}",
21 Color::Green.paint(env!("CARGO_PKG_VERSION"))
22 );
23 let env = match app.env {
24 Env::Dev => Color::LightYellow.paint("Dev"),
25 Env::Test => Color::LightBlue.paint("Test"),
26 Env::Prod => Color::Green.paint("Prod"),
27 };
28 println!("environment: {}", env);
29 if cfg!(debug_assertions) {
30 println!("compilation: {}", Color::LightRed.paint("Debug"));
31 } else {
32 println!("compilation: {}", Color::Green.paint("Release"));
33 }
34}