pontos.release package

class pontos.release.ReleaseType(value)

Type of the release. Used to determine the next release version.

PATCH

A patch version release (1.2.x)

CALENDAR

A calendar versioning release (year.month.X)

VERSION

The version is explicitly set

MAJOR

A major version release (x.0.0)

MINOR

A minor version release (1.x.0)

ALPHA

A alpha version release

BETA

A beta version release

RELEASE_CANDIDATE

A release candidate

pontos.release.get_git_repository_name(remote='origin')

Get the git repository name

Parameters:

remote (str) – the remote to look up the name (str) default: origin

Returns:

The git project name

Return type:

str

pontos.release.find_signing_key(terminal)

Find the signing key in the config

Parameters:

terminal (Terminal) – The terminal for console output

Returns:

git signing key or empty string

Return type:

str

class pontos.release.CreateReleaseCommand(*, terminal, error_terminal)

A CLI command for creating a release

Parameters:

terminal (Terminal) – A Terminal for output

async async_run(*, token, repository, versioning_scheme, release_type, release_version, next_version, git_signing_key, git_remote_name, git_tag_prefix, cc_config, local=False, release_series=None, update_project=True, github_pre_release=False)

Create a release

Parameters:
  • token (str) – A token for creating a release on GitHub

  • repository (str) – GitHub repository (owner/name)

  • versioning_scheme (VersioningScheme) – The versioning scheme to use for version parsing and calculation

  • release_type (ReleaseType) – Type of the release to prepare. Defines the release version. PATCH increments the bugfix version. CALENDAR creates a new CalVer release version. VERSION uses the provided release_version.

  • release_version (Version | None) – Optional release version to use. If not set the to be released version will be determined from the project.

  • next_version (Version | Literal[False] | None) – Optional version to set after the release. If set to None the next development version will be set. If set to False the version will not be changed after the release. Default is to update to the next development version.

  • git_signing_key (str) – A GPG key ID to use for creating signatures.

  • git_remote_name (str | None) – Name of the git remote to use.

  • git_tag_prefix (str | None) – An optional prefix to use for creating a git tag from the release version.

  • cc_config (Path | None) – A path to a settings file for creating conventional commits.

  • local (bool | None) – Only create changes locally and don’t push changes to remote repository. Also don’t create a GitHub release.

  • release_series (str | None) – Optional release series to use. For example: “1.2”, “2”, “23”.

  • update_project (bool) – Update version in project files.

  • github_pre_release (bool) – Enforce uploading a release as a GitHub pre release

Return type:

CreateReleaseReturnValue

class pontos.release.CreateReleaseReturnValue(value)

Possible return values of ReleaseCommand

class pontos.release.SignCommand(*, terminal, error_terminal)

A CLI command for signing a release

Parameters:

terminal (Terminal) – A Terminal for output

async async_run(*, token, repository, versioning_scheme, signing_key, passphrase, dry_run=False, git_tag_prefix, release_version, release_series=None)

Sign a release

Parameters:
  • token (str) – A token for creating a release on GitHub

  • repository (str) – GitHub repository (owner/name). Overrides space and project.

  • versioning_scheme (VersioningScheme) – The versioning scheme to use for version parsing and calculation

  • dry_run (bool | None) – True to not upload the signature files

  • git_tag_prefix (str | None) – An optional prefix to use for handling a git tag from the release version.

  • release_version (Version | None) – Optional release version to use. If not set the current version will be determined from the project.

  • signing_key (str) – A GPG key ID to use for creating signatures.

  • passphrase (str) – Passphrase for the signing key

  • release_series (str | None) – Optional release series to use. For example: “1.2”, “2”, “23”.

Return type:

SignReturnValue

exception pontos.release.SignatureError

Error while creating a signature

class pontos.release.SignReturnValue(value)

Possible return values of SignCommand