A fork of mtelver's day10 project
at main 43 lines 1.4 kB view raw
1type t = { 2 dir : string; 3 ocaml_version : OpamPackage.t option; (* None = let solver pick *) 4 opam_repositories : string list; 5 package : string; 6 arch : string; 7 os : string; 8 os_distribution : string; 9 os_family : string; 10 os_version : string; 11 directory : string option; 12 md : string option; 13 json : string option; 14 dot : string option; 15 with_test : bool; 16 with_doc : bool; 17 with_jtw : bool; 18 doc_tools_repo : string; 19 doc_tools_branch : string; 20 jtw_tools_repo : string; 21 jtw_tools_branch : string; 22 local_repos : string list; 23 html_output : string option; (* Shared HTML output directory for all docs *) 24 jtw_output : string option; (* Output directory for jtw artifacts *) 25 tag : string option; 26 log : bool; 27 dry_run : bool; 28 fork : int option; 29 prune_layers : bool; (* Delete target layer after docs extracted to html_output *) 30 blessed_map : bool OpamPackage.Map.t option; (* Pre-computed blessing map from batch mode *) 31} 32 33let std_env ~(config : t) = 34 Util.std_env ~arch:config.arch ~os:config.os ~os_distribution:config.os_distribution ~os_family:config.os_family ~os_version:config.os_version 35 ?ocaml_version:config.ocaml_version () 36 37let os_key ~(config : t) = 38 let os = 39 List.map 40 (fun v -> std_env ~config v |> Option.map OpamVariable.string_of_variable_contents |> Option.value ~default:"unknown") 41 [ "os-distribution"; "os-version"; "arch" ] 42 in 43 String.concat "-" os