Versioning¶
versioning
¶
Functions:
| Name | Description |
|---|---|
get_last_release |
Return the most recent git tag that matches semver format (vX.Y.Z). |
get_last_tag |
Return the most recent git tag in the current repository. |
get_next_releases |
Compute the next minor, patch, and major release tags from the last release. |
is_valid_semver |
Check whether a tag string follows the vX.Y.Z semver format. |
get_last_release
¶
get_last_release() -> Optional[str]
Return the most recent git tag that matches semver format (vX.Y.Z).
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Last semver-formatted release tag, or None if none is found. |
Source code in oops/utils/versioning.py
get_last_tag
¶
get_last_tag() -> Optional[str]
Return the most recent git tag in the current repository.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Most recent tag name, or None if no tags exist or the command fails. |
Source code in oops/utils/versioning.py
get_next_releases
¶
get_next_releases() -> tuple
Compute the next minor, patch, and major release tags from the last release.
Returns:
| Type | Description |
|---|---|
tuple
|
Tuple of (minor_bump, patch_bump, major_bump) version strings, e.g. |
tuple
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If no valid semver release tag is found. |