Skip to content

Commit 1423cc1

Browse files
committed
opam: remove upper bound constraint on cmdliner
1 parent c8ca17d commit 1423cc1

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

monorobot.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ depends: [
1818
"base" {>= "v0.13.0"}
1919
"base64" {>= "3.0.0"}
2020
"biniou"
21-
"cmdliner" {>= "0.9.8" & < "1.1.0"} # TODO fix deprecation warnings
21+
"cmdliner" {>= "0.9.8"}
2222
"cstruct"
2323
"devkit" {>= "1.20210120"}
2424
"extlib" {>= "1.7.8"}

src/monorobot.ml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,27 @@ let json =
101101

102102
let run =
103103
let doc = "launch the http server" in
104-
let info = Term.info "run" ~doc in
104+
let info = Cmd.info "run" ~doc in
105105
let term = Term.(const http_server_action $ addr $ port $ config $ secrets $ state) in
106-
term, info
106+
Cmd.v info term
107107

108108
let check_gh =
109109
let doc = "read a Github notification from a file and display the actions that will be taken; used for testing" in
110-
let info = Term.info "check_gh" ~doc in
110+
let info = Cmd.info "check_gh" ~doc in
111111
let term = Term.(const check_gh_action $ gh_payload $ json $ config $ secrets $ state) in
112-
term, info
112+
Cmd.v info term
113113

114114
let check_slack =
115115
let doc = "read a Slack notification from a file and send it to a channel; used for testing" in
116-
let info = Term.info "check_slack" ~doc in
116+
let info = Cmd.info "check_slack" ~doc in
117117
let term = Term.(const check_slack_action $ slack_payload $ secrets) in
118-
term, info
118+
Cmd.v info term
119119

120-
let default_cmd =
120+
let default, info =
121121
let doc = "the notification bot" in
122-
Term.(ret (const (`Help (`Pager, None)))), Term.info "monorobot" ~doc ~version:Version.current
122+
Term.(ret (const (`Help (`Pager, None)))), Cmd.info "monorobot" ~doc ~version:Version.current
123123

124-
let cmds = [ run; check_gh; check_slack ]
125-
let () = Term.(exit @@ eval_choice default_cmd cmds)
124+
let () =
125+
let cmds = [ run; check_gh; check_slack ] in
126+
let group = Cmd.group ~default info cmds in
127+
Caml.exit @@ Cmd.eval group

0 commit comments

Comments
 (0)