Skip to main content

ensure_vendored_release

Function ensure_vendored_release 

Source
pub fn ensure_vendored_release(
    token: &str,
    repo: &Repo,
    tag: &str,
    body: &str,
    sha: &str,
) -> Result<String>
Expand description

The Release for a vendored set’s tag, created at sha when the tag has none. Returns its HTML URL.

An existing Release is used as it is. Its tag records which commit built the first asset, and that commit is not a version commit, so the tag target is not checked.

A new Release is created with make_latest: false. GitHub otherwise makes every new published Release the latest of the repository (create a release). A vendored library must not displace the Release of the repository itself.

§Errors

Returns an error when the GitHub client cannot be built or when reading the Release fails with anything but 404. It also returns one when creating the Release fails for any reason other than another job having created it first.