package b0

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

B0 software release helpers.

Release metadata

module Meta : sig ... end

Metadata keys for releases.

Versions

val version_of_pack : ?commit_ish:B00_vcs.commit_ish -> B0_pack.t -> (string, string) result

version_of_pack p looks for a VCS in the scope directory of p and gets its latest annotated tag reachable from commit_ish (defaults to "HEAD") and drops an initial 'v' or 'V'. TODO. add a meta key to prevent v drop.

Source archives

val src_archive_name_of_pack : B0_pack.t -> string

src_archive_name_of_meta m is the value or Meta.src_archive_name or the pack's basename if absent, unless this is "default" in which case the basename of the pack's scope is taken.

val src_archive_ext_of_pack : B0_pack.t -> string

src_archive_ext_of_pack p is the value of Meta.src_archive_ext of p or ".tbz".

val src_archive_url_of_pack : version:string -> B0_pack.t -> (string, string) result

src_url_of_meta ~version p derives a source URL for the pack p. This looks up Meta.src_archive_url p and substitute the variables as follows:

  • %‌%ARCHIVE_NAME%‌% with the value of src_archive_name_of_pack.
  • %‌%ARCHIVE_EXT%‌% with the value of src_archive_name_of_ext.
  • %‌%VERSION%‌% with the value of version
  • %‌%VERSION_NUM%‌% with the value of version with an initial v or V chopped.

If Meta.src_archive_url is absent, let %%HOMEPAGE%% be the value of B0_meta.homepage and %%REPO%% be the value of B0_meta.repo without the final .git and initial git+ Then:

  • If the hostname of B0_meta.homepage is github the following URL pattern is used:

    %‌%REPO%‌%/releases/download/%‌%VERSION%‌%/\
    %‌%ARCHIVE_NAME%‌%-%‌%VERSION_NUM%‌%‌%‌%ARCHIVE_EXT%‌%
  • Otherwise the following URL pattern is used:

    %‌%HOMEPAGE%‌%/releases/\
    %‌%ARCHIVE_NAME%‌%-%‌%VERSION_NUM%‌%‌%‌%ARCHIVE_EXT%‌%

Change logs

val changes_file_of_pack : B0_pack.t -> (B0_std.Fpath.t option, string) result

changes_file_of_pack p looks for a CHANGES.md file located in the scope directory of p.

val changes_latest_of_file : B0_std.Fpath.t -> ((string * string) option, string) result

changes_latest_of_file f extracts the latest release notes as the first markdown section of file f.

Cmdlets

module Cmdlet : sig ... end

.release.* Cmdlets

OCaml

Innovation. Community. Security.