main: add -v/--version flag

Added a new dependency to take care of pulling in the version from git
at build time.

Args handling is minimalistic, but there wasn't any before, so I figured
this might do for now. (Eventually, some proper `--help` and usage
output might come in handy?)

Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
Stephan Renatus
2020-03-27 19:59:48 +01:00
parent 7de39611f3
commit 896f2aeb74
3 changed files with 73 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ num = ["num-rug-adapter", "prolog_parser/num"]
crossterm = "0.16.0"
dirs = "2.0.2"
downcast = "0.10.0"
git-version = "0.3.4"
indexmap = "1.0.2"
lazy_static = "1.4.0"
libc = "0.2.62"