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:Version.t -> ?tag:Vcs.Tag.t -> ?keep_v:bool -> ?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 -> ?project_name:string option -> unit -> t
val infer_pkg_names : Fpath.t -> string list -> (string list, Bos_setup.R.msg) Bos_setup.result

Infer the package list.

val main : t list -> t

Infer which package is the main one in a nonempty list (the one with a name equal to the project name)

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 project_name : t -> string option

project_name p is the name of the project as found in dune-project.

version p is p's version.

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.

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_github_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_github_repo 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_opam_path : t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

distrib_opam_path p is an opam distribution filename for p.

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 -> (Version.Changelog.t, Sos.error) Bos_setup.result

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

val version_of_changelog : t -> Version.Changelog.t -> Version.t

version_of_changelog p cl determines the project version from the version supplied in the changelog cl.

Dev repo

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

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

Dune project

val dune_project_name : Fpath.t -> (string option, [> Rresult.R.msg ]) Bos_setup.result

Returns the name stanza entry of the dune project, if any; else, returns `None`. Returns an error, if one of the system calls fails.

OCaml

Innovation. Community. Security.