semantic_release.version.algorithm module¶
- semantic_release.version.algorithm.next_version(repo: Repo, translator: VersionTranslator, commit_parser: CommitParser[ParseResult, ParserOptions], prerelease: bool = False, major_on_zero: bool = True, allow_zero_version: bool = True) Version [source]¶
Evaluate the history within repo, and based on the tags and commits in the repo history, identify the next semantic version that should be applied to a release
- semantic_release.version.algorithm.tags_and_versions(tags: Iterable[Tag], translator: VersionTranslator) list[tuple[Tag, Version]] [source]¶
Return a list of 2-tuples, where each element is a tuple (tag, version) from the tags in the Git repo and their corresponding Version according to Version.from_tag. The returned list is sorted according to semver ordering rules.
Tags which are not matched by translator are ignored.