mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
feat: add build information
This commit is contained in:
parent
e8e759a719
commit
0177086dcc
3 changed files with 14 additions and 1 deletions
12
src/args.rs
12
src/args.rs
|
|
@ -13,6 +13,9 @@ pub fn handle_args() {
|
|||
"-h" | "--help" => {
|
||||
print_help();
|
||||
}
|
||||
"-v" | "--version" => {
|
||||
print_version();
|
||||
}
|
||||
"-a" | "--alias" => {
|
||||
if args.len() > index + 1 {
|
||||
if args[index + 1].starts_with('-') {
|
||||
|
|
@ -57,3 +60,12 @@ fn print_help() {
|
|||
);
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
fn print_version() {
|
||||
println!("version: {}", option_env!("CARGO_PKG_VERSION").unwrap_or("unknown"));
|
||||
println!("compile features:");
|
||||
#[cfg(feature = "runtime-rules")] {
|
||||
println!(" - runtime-rules");
|
||||
}
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,6 @@ fn main() {
|
|||
eprintln!(
|
||||
"{}\n{}",
|
||||
t!("contribute"),
|
||||
"https://github.com/iffse/pay-respects"
|
||||
option_env!("CARGO_PKG_REPOSITORY").unwrap_or("https://github.com/iffse/pay-respects/")
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue