Skip to content

Commit

Permalink
Merge pull request #445 from hannesm/cmdliner-1.1.0
Browse files Browse the repository at this point in the history
support cmdliner 1.1.0 and above without deprecation
  • Loading branch information
hannesm committed Mar 29, 2022
2 parents c8d1fa0 + 67cefea commit 2c9dfc3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
8 changes: 5 additions & 3 deletions lwt/examples/echo_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ let trust =
Arg.(value & opt (some string) None & info [ "trust" ] ~doc)

let cmd =
Term.(const jump $ setup_log $ port $ host $ trust),
Term.info "server" ~version:"%%VERSION_NUM%%"
let term = Term.(const jump $ setup_log $ port $ host $ trust)
and info = Cmd.info "server" ~version:"%%VERSION_NUM%%"
in
Cmd.v info term

let () = match Term.eval cmd with `Ok () -> exit 0 | _ -> exit 1
let () = exit (Cmd.eval cmd)
8 changes: 5 additions & 3 deletions lwt/examples/echo_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ let port =
Arg.(value & opt int 4433 & info [ "port" ] ~doc)

let cmd =
Term.(ret (const echo_server $ setup_log $ port)),
Term.info "server" ~version:"%%VERSION_NUM%%"
let term = Term.(ret (const echo_server $ setup_log $ port))
and info = Cmd.info "server" ~version:"%%VERSION_NUM%%"
in
Cmd.v info term

let () = match Term.eval cmd with `Ok () -> exit 0 | _ -> exit 1
let () = exit (Cmd.eval cmd)
8 changes: 5 additions & 3 deletions lwt/examples/fuzz_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ let port =
Arg.(value & opt int 4433 & info [ "port" ] ~doc)

let cmd =
Term.(ret (const jump $ setup_log $ port)),
Term.info "server" ~version:"%%VERSION_NUM%%"
let term = Term.(ret (const jump $ setup_log $ port))
and info = Cmd.info "server" ~version:"%%VERSION_NUM%%"
in
Cmd.v info term

let () = match Term.eval cmd with `Ok () -> exit 0 | _ -> exit 1
let () = exit (Cmd.eval cmd)
8 changes: 5 additions & 3 deletions lwt/examples/test_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ let jump _ =
open Cmdliner

let cmd =
Term.(ret (const jump $ setup_log)),
Term.info "test_client" ~version:"%%VERSION_NUM%%"
let term = Term.(ret (const jump $ setup_log))
and info = Cmd.info "test_client" ~version:"%%VERSION_NUM%%"
in
Cmd.v info term

let () = match Term.eval cmd with `Ok () -> exit 0 | _ -> exit 1
let () = exit (Cmd.eval cmd)
1 change: 1 addition & 0 deletions tls.opam
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ depends: [
"ipaddr-sexp"
"alcotest" {with-test}
"randomconv" {with-test}
"cmdliner" {dev & > "1.1.0"}
]
conflicts: [ "result" {< "1.5"} ]
tags: [ "org:mirage"]
Expand Down

0 comments on commit 2c9dfc3

Please sign in to comment.