spm_swift_package/presentation/
header.rs1use crate::utils::theme_colors::*;
2use clap::Command;
3use colored::Colorize;
4
5pub const VERSION: &str = env!("CARGO_PKG_VERSION");
6
7pub struct Header;
8
9impl Header {
10 pub fn show() -> String {
11 Self::check_version();
12
13 format!(
14 "\n{}\n\
15 🚀 You can create your Swift Package via the command line 🔨\n\
16 v{}\n",
17 "SPM Swift Package".color(ThemeColors::ORANGE_TERM),
18 VERSION
19 )
20 }
21
22 fn check_version() {
23 let _ = Command::new("spm-swift-package")
24 .version(VERSION)
25 .ignore_errors(true)
26 .get_matches();
27 }
28}