File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ depends: [
18
18
"base" {>= "v0.13.0"}
19
19
"base64" {>= "3.0.0"}
20
20
"biniou"
21
- "cmdliner" {>= "0.9.8" & < "1.1.0"} # TODO fix deprecation warnings
21
+ "cmdliner" {>= "0.9.8"}
22
22
"cstruct"
23
23
"devkit" {>= "1.20210120"}
24
24
"extlib" {>= "1.7.8"}
Original file line number Diff line number Diff line change @@ -101,25 +101,27 @@ let json =
101
101
102
102
let run =
103
103
let doc = " launch the http server" in
104
- let info = Term . info " run" ~doc in
104
+ let info = Cmd . info " run" ~doc in
105
105
let term = Term. (const http_server_action $ addr $ port $ config $ secrets $ state) in
106
- term, info
106
+ Cmd. v info term
107
107
108
108
let check_gh =
109
109
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
111
111
let term = Term. (const check_gh_action $ gh_payload $ json $ config $ secrets $ state) in
112
- term, info
112
+ Cmd. v info term
113
113
114
114
let check_slack =
115
115
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
117
117
let term = Term. (const check_slack_action $ slack_payload $ secrets) in
118
- term, info
118
+ Cmd. v info term
119
119
120
- let default_cmd =
120
+ let default, info =
121
121
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
123
123
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
You can’t perform that action at this time.
0 commit comments