package b0
Module B0_releaseSource
B0 software release helpers.
Release metadata
Versions
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
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.
src_archive_ext_of_pack p is the value of Meta.src_archive_ext of p or ".tbz".
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 ofsrc_archive_name_of_pack.%%ARCHIVE_EXT%%with the value ofsrc_archive_name_of_ext.%%VERSION%%with the value ofversion%%VERSION_NUM%%with the value ofversionwith an initialvorVchopped.
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.homepageis 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
changes_file_of_pack p looks for a CHANGES.md file located in the scope directory of p.
changes_latest_of_file f extracts the latest release notes as the first markdown section of file f.