zapashcanon 1 year ago
parent
commit
145f12d2c7
Signed by: zapashcanon GPG Key ID: 8981C3C62D1D28F1
  1. 5
      .ocamlformat
  2. 8
      src/check_content.ml
  3. 2
      src/check_repo.ml
  4. 12
      src/orel_opam_repo.ml

5
.ocamlformat

@ -1,4 +1,4 @@
version=0.21.0
version=0.25.1
assignment-operator=end-line
break-cases=fit
break-fun-decl=wrap
@ -24,8 +24,9 @@ let-and=sparse
let-binding-spacing=compact
let-module=compact
margin=80
max-indent=68
max-indent=2
module-item-spacing=sparse
ocaml-version=4.14.0
ocp-indent-compat=false
parens-ite=false
parens-tuple=always

8
src/check_content.ml

@ -53,7 +53,7 @@ let opam_description _path repo_contents =
let opam_show =
Bos.Cmd.(
v "opam" % "show" % "--color" % "never" % "--no-lint"
% "--normalise" % "-f" % "description:" % opam_file_name)
% "--normalise" % "-f" % "description:" % opam_file_name )
in
match Bos.OS.Cmd.run_out opam_show |> Bos.OS.Cmd.to_lines with
@ -99,7 +99,7 @@ let opam_license _path repo_contents =
let opam_show =
Bos.Cmd.(
v "opam" % "show" % "--color" % "never" % "--empty-fields"
% "--no-lint" % "--normalise" % "-f" % "license:" % opam_file_name)
% "--no-lint" % "--normalise" % "-f" % "license:" % opam_file_name )
in
match Bos.OS.Cmd.run_out opam_show |> Bos.OS.Cmd.to_lines with
@ -144,7 +144,7 @@ let opam_dev_repo _path repo_contents =
let opam_show =
Bos.Cmd.(
v "opam" % "show" % "--color" % "never" % "--no-lint"
% "--normalise" % "-f" % "dev-repo:" % opam_file_name)
% "--normalise" % "-f" % "dev-repo:" % opam_file_name )
in
match Bos.OS.Cmd.run_out opam_show |> Bos.OS.Cmd.to_lines with
@ -189,7 +189,7 @@ let opam_tags _path repo_contents =
let opam_show =
Bos.Cmd.(
v "opam" % "show" % "--color" % "never" % "--no-lint"
% "--normalise" % "-f" % "tags:" % opam_file_name)
% "--normalise" % "-f" % "tags:" % opam_file_name )
in
match Bos.OS.Cmd.run_out opam_show |> Bos.OS.Cmd.to_lines with

2
src/check_repo.ml

@ -24,7 +24,7 @@ let get_repo_url contents =
Bos.OS.Cmd.run_out
Bos.Cmd.(
v "opam" % "show" % "--color" % "never" % "--no-lint" % "--normalise"
% "-f" % "dev-repo:" % Fpath.to_string file)
% "-f" % "dev-repo:" % Fpath.to_string file )
|> Bos.OS.Cmd.to_lines
with
| Error _e -> None

12
src/orel_opam_repo.ml

@ -28,7 +28,7 @@ let () =
let init_opam_repo =
Bos.Cmd.(
v "opam" % "init" % "--bare" % "--no-setup" % "--root" % opam_root
% instance % Sys.argv.(1))
% instance % Sys.argv.(1) )
in
Format.eprintf "creating opam switch... ";
@ -45,7 +45,7 @@ let () =
let empty_switch =
Bos.Cmd.(
v "opam" % "switch" % "create" % "--empty" % "--root" % opam_root
% "empty")
% "empty" )
in
Format.eprintf "creating empty switch... ";
@ -62,7 +62,7 @@ let () =
let list_packages =
Bos.Cmd.(
v "opam" % "list" % "--all" % "--no-switch" % "--repos" % instance
% "--normalise" % "--color" % "never" % "--short" % "--root" % opam_root)
% "--normalise" % "--color" % "never" % "--short" % "--root" % opam_root )
in
let packages =
@ -99,7 +99,7 @@ let () =
Bos.Cmd.(
v "opam" % "list" % "--all" % "--no-switch" % "--repos" % instance
% "--normalise" % "--color" % "never" % "--short" % "--root" % opam_root
% "--has-flag=conf")
% "--has-flag=conf" )
in
let conf_packages =
@ -118,7 +118,7 @@ let () =
Bos.Cmd.(
v "opam" % "list" % "--all" % "--no-switch" % "--repos" % instance
% "--normalise" % "--color" % "never" % "--short" % "--root" % opam_root
% "--has-flag=compiler")
% "--has-flag=compiler" )
in
let compiler_packages =
@ -153,7 +153,7 @@ let () =
Bos.OS.Cmd.run_status ~quiet:true
Bos.Cmd.(
v "opam" % "source" % "--root" % opam_root % "--dev-repo" % package
% "--dir" % download_dir_s)
% "--dir" % download_dir_s )
with
| Ok (`Exited 0) ->
Format.eprintf "done@.";

Loading…
Cancel
Save