package dune-release

  1. Overview
  2. Docs

Package descriptions.

Package

type t

The type for package descriptions.

val infer_name_err : ('a, Stdlib.Format.formatter, unit, unit, unit, 'a) Stdlib.format6
val try_infer_name : Fpath.t -> (string option, [> Rresult.R.msg ]) Bos_setup.result

try_infer_name dir tries to infer the name of the main package in dir. If you already have a package p, use name p instead.

val v : dry_run:bool -> ?name:string -> ?version:string -> ?tag:string -> ?keep_v:bool -> ?delegate:Bos_setup.Cmd.t -> ?build_dir:Fpath.t -> ?opam:Fpath.t -> ?opam_descr:Fpath.t -> ?readme:Fpath.t -> ?change_log:Fpath.t -> ?license:Fpath.t -> ?distrib_file:Fpath.t -> ?publish_msg:string -> unit -> t
val infer_pkg_names : Fpath.t -> string list -> (string list, Bos_setup.R.msg) Bos_setup.result

Infer the package list.

val name : t -> (string, Bos_setup.R.msg) Bos_setup.result

name p is p's name.

val with_name : t -> string -> t

with_name t n is r such that like name r is n and f r is f t otherwise.

val version : t -> (string, Bos_setup.R.msg) Bos_setup.result

version p is p's version string.

val tag_from_repo : ?tag:string -> ?version:string -> unit -> (string, [ `Msg of string ]) Bos_setup.result

Returns the commit-ish tag or version (in that order), if any of them is provided. If not, returns the commit-ish of the latest tag pointing to HEAD.

val tag : t -> (string, Bos_setup.R.msg) Bos_setup.result
val delegate : t -> (Bos_setup.Cmd.t option, Bos_setup.R.msg) Bos_setup.result

delegate p is p's delegate.

val build_dir : t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

build_dir p is p's build directory.

val opam : t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

opam p is p's opam file.

val opam_descr : t -> (Opam.Descr.t, Bos_setup.R.msg) Bos_setup.result

opam_descr p is p's opam description.

val opam_homepage : t -> (string option, Bos_setup.R.msg) Bos_setup.result
val opam_doc : t -> (string option, Bos_setup.R.msg) Bos_setup.result
val opam_field : t -> string -> (string list option, Bos_setup.R.msg) Bos_setup.result

opam_field p f looks up field f of p's opam file.

val opam_field_hd : t -> string -> (string option, Sos.error) Bos_setup.result
val readmes : t -> (Fpath.t list, Bos_setup.R.msg) Bos_setup.result

readmes p are p's readme files.

val change_logs : t -> (Fpath.t list, Bos_setup.R.msg) Bos_setup.result

change_logs p are p's change logs.

val change_log : t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

change_log p is the first element of change_logs p.

val licenses : t -> (Fpath.t list, Bos_setup.R.msg) Bos_setup.result

licenses p are p's license files.

val infer_github_distrib_uri : t -> (string, Bos_setup.R.msg) Bos_setup.result

infer_distrib_uri p infers p's Github distribution URI from the homepage and dev-repo fields.

val infer_github_repo : t -> (Github_repo.t, Bos_setup.R.msg) Bos_setup.result

infer_repo_uri p infers p's Github remote repository from the homepage and dev-repo fields.

val distrib_file : dry_run:bool -> t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

distrib_file p is p's distribution archive.

val publish_msg : t -> (string, Bos_setup.R.msg) Bos_setup.result

publish_msg p is p's distribution publication message.

Distribution

val distrib_archive : dry_run:bool -> keep_dir:bool -> include_submodules:bool -> t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

distrib_archive ~keep_dir p creates a distribution archive for p and returns its path. If keep_dir is true the repository checkout used to create the distribution archive is kept in the build directory.

val distrib_archive_path : t -> (Fpath.t, Rresult.R.msg) Bos_setup.result
val archive_url_path : t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

archive_url_path is the path to the file where the archive download URL is saved

val distrib_filename : ?opam:bool -> t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

distrib_filename ~opam p is a distribution filename for p. If opam is true (defaults to false), the name follows opam's naming conventions.

Uri

val doc_uri : t -> (string, Bos_setup.R.msg) Bos_setup.result
val doc_dir : Fpath.t
val github_doc_owner_repo_and_path : t -> (string * string * Fpath.t, Bos_setup.R.msg) Bos_setup.result
type f = dry_run:bool -> dir:Fpath.t -> args:Bos_setup.Cmd.t -> out: (Bos_setup.OS.Cmd.run_out -> (string * Bos_setup.OS.Cmd.run_status, Sos.error) Bos_setup.result) -> ?err:Bos.OS.Cmd.run_err -> string list -> (string * Bos_setup.OS.Cmd.run_status, Sos.error) Bos_setup.result

Test

val test : f

Build

val build : f

Version

val extract_version : t -> (string, Sos.error) Bos_setup.result

extract_version p extracts the version identifier from the changelog of p.

Dev repo

val dev_repo : t -> (string option, Sos.error) Bos_setup.result

dev-repo field with the "git+" prefix removed.

OCaml

Innovation. Community. Security.