Compare commits
No commits in common. "4a4c22e24416358667e656c14dcfb9289c0ab132" and "1918cb38215a84e0cd29a947032bcbfbef8a41e5" have entirely different histories.
4a4c22e244
...
1918cb3821
3 changed files with 1 additions and 25 deletions
1
bin/dune
1
bin/dune
|
@ -14,7 +14,6 @@
|
|||
fmt.tty
|
||||
logs.fmt
|
||||
git-unix
|
||||
bos
|
||||
yocaml
|
||||
yocaml_git
|
||||
yocaml_syndication
|
||||
|
|
24
bin/push.ml
24
bin/push.ml
|
@ -15,34 +15,12 @@ let reporter ppf =
|
|||
in
|
||||
{ Logs.report }
|
||||
|
||||
let run_git_rev_parse () =
|
||||
let open Bos in
|
||||
let value = OS.Cmd.run_out
|
||||
Cmd.(v "git" % "describe" % "--always" % "--dirty"
|
||||
% "--exclude=*" % "--abbrev=0")
|
||||
in
|
||||
match OS.Cmd.out_string value with
|
||||
| Ok (value, (_, `Exited 0)) -> Some value
|
||||
| Ok (value, (run_info, _)) ->
|
||||
Logs.warn (fun m -> m "Failed to get commit id: %a: %s"
|
||||
Cmd.pp (OS.Cmd.run_info_cmd run_info)
|
||||
value);
|
||||
None
|
||||
| Error `Msg e ->
|
||||
Logs.warn (fun m -> m "Failed to get commit id: %s" e);
|
||||
None
|
||||
|
||||
let message () =
|
||||
match run_git_rev_parse () with
|
||||
| Some hash -> Fmt.str "Pushed by YOCaml 2 from %s" hash
|
||||
| None -> Fmt.str "Pushed by YOCaml 2"
|
||||
|
||||
let () = Fmt_tty.setup_std_outputs ~style_renderer:`Ansi_tty ~utf_8:true ()
|
||||
let () = Logs.set_reporter (reporter Fmt.stdout)
|
||||
(* let () = Logs.set_level ~all:true (Some Logs.Debug) *)
|
||||
let author = ref "The Robur Team"
|
||||
let email = ref "team@robur.coop"
|
||||
let message = ref (message ())
|
||||
let message = ref "Pushed by YOCaml 2"
|
||||
let remote = ref "git@git.robur.coop:robur/blog.robur.coop.git#gh-pages"
|
||||
let host = ref "https://blog.robur.coop"
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ depends: [
|
|||
"logs" {>= "0.7.0" }
|
||||
"cmdliner" { >= "1.0.0"}
|
||||
"http-lwt-client"
|
||||
"bos"
|
||||
"yocaml" {>= "2.0.1"}
|
||||
"yocaml_unix"
|
||||
"yocaml_yaml"
|
||||
|
|
Loading…
Reference in a new issue