Skip to content
Back to top
View this page

# semantic_release.version.algorithm module

semantic_release.version.algorithm.next_version(repo: Repo, translator: VersionTranslator, commit_parser: CommitParser[ParseResult, ParserOptions], allow_zero_version: bool, major_on_zero: bool, prerelease: bool = False) → Version

  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]]

  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.