pontos.release package#
- class pontos.release.ReleaseType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
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, space, project_name, 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)#
Create a release
- Parameters:
token (str) – A token for creating a release on GitHub
space (str) – GitHub username or organization. Required for generating links in the changelog.
project – Name of the project to release. If not set it will be gathered via the git remote url.
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 (Optional[Version]) – Optional release version to use. If not set the to be released version will be determined from the project.
next_version (Optional[Version]) – Optional version to set after the release. If not set the next development version will be set.
git_signing_key (str) – A GPG key ID to use for creating signatures.
git_remote_name (Optional[str]) – Name of the git remote to use.
git_tag_prefix (Optional[str]) – An optional prefix to use for creating a git tag from the release version.
cc_config (Optional[Path]) – A path to a settings file for creating conventional commits.
local (Optional[bool]) – Only create changes locally and don’t push changes to remote repository. Also don’t create a GitHub release.
release_series (Optional[str]) – Optional release series to use. For example: “1.2”, “2”, “23”.
update_project (bool) – Update version in project files.
- Return type:
- class pontos.release.CreateReleaseReturnValue(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
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, space, versioning_scheme, signing_key, passphrase, dry_run=False, project, git_tag_prefix, release_version, release_series=None)#
Sign a release
- Parameters:
token (str) – A token for creating a release on GitHub
dry_run (Optional[bool]) – True to not upload the signature files
space (str) – GitHub username or organization. Required for generating links in the changelog.
project (Optional[str]) – Name of the project to release. If not set it will be gathered via the git remote url.
versioning_scheme (VersioningScheme) – The versioning scheme to use for version parsing and calculation
git_tag_prefix (Optional[str]) – An optional prefix to use for handling a git tag from the release version.
release_version (Optional[Version]) – 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 (Optional[str]) – Optional release series to use. For example: “1.2”, “2”, “23”.
- Return type:
- exception pontos.release.SignatureError#
Error while creating a signature
- class pontos.release.SignReturnValue(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Possible return values of SignCommand