Skip to content

Commit

Permalink
new: version subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Oct 30, 2024
1 parent a95669c commit 5e80b8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub(crate) enum Command {
Verify(VerifyArgs),
/// Generate a DOT representation of the graph of the model.
Graph(GraphArgs),
/// Print version and exit.
Version,
}

#[derive(Debug, Clone, ValueEnum)]
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ fn main() {
Command::Sign(args) => cli::sign(args),
Command::Verify(args) => cli::verify(args),
Command::Graph(args) => cli::graph(args),
Command::Version => {
println!("{} v{}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
Ok(())
}
};

if let Err(e) = ret {
Expand Down

0 comments on commit 5e80b8c

Please sign in to comment.