livery.workshop._versions¶
livery.workshop._versions ¶
The next version a package's unreleased commits earn.
The release train's version comes from the commit convention the
base already enforces (livery.workshop._conventional): the commits
since the package's newest receipt tag that touch its directory,
each read for a break and a feature. Before 1.0 a break or a feature
bumps the minor version and anything else the patch; from 1.0 a break
bumps the major, a feature the minor, anything else the patch. A
release commit (chore(release)) earns nothing, and a commit whose
subject follows no convention counts as a patch.
A package with no receipt tag yet releases at its [release]
baseline, else at 0.0.0: the first release is the starting point,
not a bump from it.
Functions:
| Name | Description |
|---|---|
baseline |
The version package first releases at: its declared baseline, else 0.0.0. |
bump |
version bumped by the (subject, body) pairs messages, or unchanged. |
derive_version |
The version package's unreleased commits earn, bare semver. |
baseline ¶
The version package first releases at: its declared baseline, else 0.0.0.
Source code in packages/workshop/src/livery/workshop/_versions.py
bump ¶
version bumped by the (subject, body) pairs messages, or unchanged.
Raises:
| Type | Description |
|---|---|
ValueError
|
when version is not |
Source code in packages/workshop/src/livery/workshop/_versions.py
derive_version ¶
The version package's unreleased commits earn, bare semver.
released is the newest receipt's version, read from the tags when empty. With no receipt the answer is the baseline. With one, an answer equal to it means nothing unreleased touches the package, which the caller reports.