Switched to using --version for printing visualization-version - will not be the same as library version

This commit is contained in:
rand00 2022-04-28 16:08:06 +02:00
parent d1cb3de48f
commit 9374398607

View file

@ -77,8 +77,15 @@ let file =
Arg.(required & pos 0 (some file) None & info [ ] ~doc ~docv:"FILE")
let cmd =
let term = Term.(const jump $ setup_log $ transitive $ file $ output_format) in
let info = Cmd.info "opam-graph" ~version:"%%VERSION%%" in
let term = Term.(
const jump
$ setup_log
$ transitive
$ file
$ output_format
) in
let version = Fmt.str "%d" Opam_graph.visualization_version in
let info = Cmd.info "opam-graph" ~version in
Cmd.v info term
let () = Cmd.eval cmd |> exit