Skip to main content

Module release

Module release 

Source
Expand description

Releases of a git-sourced capability, read from the repository’s tags (RFC-101).

Nobody assigns versions to skills today, so Tuff derives them from the one convention that already exists in the wild: a tag such as v1.4.0. A monorepo tags per capability, <name>/v1.4.0 or <name>-v1.4.0, and when any tag is scoped to the capability only those count, so a repo-wide v2.0.0 cannot be mistaken for a release of one of its skills.

Everything here is pure: the caller lists the tags (git ls-remote) and clones the chosen one. The lockfile keeps pinning the commit; the tag and the requirement are recorded beside it so update can move within the requirement and outdated can say how far behind an install is.

Structs§

ReleaseTag
A tag that names a release of one capability.

Enums§

TagIntegrity
Whether the tag an install was pinned to still names the commit that was installed. A tag is mutable by design; the lockfile pins the commit, so the install itself is unaffected, but a tag that now names different content means the version you have may not be what you think it is. That is a different finding from “a newer release exists”.
VersionRequest
What the user asked for after the @ in name@1.2.0 or name@^1.2.

Functions§

change_kind
The claimed size of moving from one release to another, read from the version numbers alone. It is what the author claimed, not what the diff shows, which is why outdated prints it beside the versions and tuff diff --upstream stays one keystroke away.
latest_release
The newest release, if there is one.
parse_release_tag
Read one tag as a release of name, if it is one. Recognised shapes are v1.4.0 and 1.4.0 for the whole repository, and <name>/v1.4.0 or <name>-v1.4.0, with or without the v, for one capability in it.
release_tags
The releases of name among a repository’s tags, oldest first. When any tag is scoped to the capability, only scoped tags count: a monorepo’s repo-wide tag is not a release of one of its members.
resolve_release
Choose the release of name that satisfies request, from a raw tag list, with an error that says what was available when nothing does.
select_release
The newest release satisfying the request.
split_version_request
Split name@requirement into its parts. A bare name has no requirement; an empty name or an empty requirement is a usage error.
tag_integrity