pontos.version.commands package

class pontos.version.commands.VersionCommand(versioning_scheme)

Generic class usable to implement the version commands for several programming languages

abstractmethod get_current_version()

Get the current version of this project

Return type:

Version

project_found()

Returns True if a command has detected a corresponding project

Return type:

bool

abstractmethod update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

abstractmethod verify_version(version)

Verify the current version of this project

Parameters:

version (Literal['current'] | ~pontos.version._version.Version | None) – Version to check against the current applied version of this project. If version is None or “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.

class pontos.version.commands.CMakeVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

Parameters:

version (Literal['current'] | ~pontos.version._version.Version | None) – Version to check against the current applied version of this project. If version is None or “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.

class pontos.version.commands.GoVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project In go the version is only defined within the repository tags, thus we need to check git, what tag is the latest

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

class pontos.version.commands.JavaScriptVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project In go the version is only defined within the repository tags, thus we need to check git, what tag is the latest

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

class pontos.version.commands.JavaVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

Parameters:

version (Literal['current'] | ~pontos.version._version.Version | None) – Version to check against the current applied version of this project. If version is None or “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.

class pontos.version.commands.PythonVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

Parameters:

version (Literal['current'] | ~pontos.version._version.Version | None) – Version to check against the current applied version of this project. If version is None or “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.

class pontos.version.commands.CargoVersionCommand(versioning_scheme)
get_current_version()

Get the current version of this project

Return type:

Version

update_version(new_version, *, force=False)

Update the current version of this project

Parameters:
  • new_version (Version) – Use this version in the update

  • force (bool) – Force updating the version even if the current version is the same as the new version

Returns:

The version update including the changed files

Return type:

VersionUpdate

verify_version(version)

Verify the current version of this project

Parameters:

version (Literal['current'] | ~pontos.version._version.Version | None) – Version to check against the current applied version of this project. If version is None or “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.

class pontos.version.commands.ProjectType(*values)
pontos.version.commands.get_commands(names=None)

Returns the available VersionCommands

Return type:

list[Type[VersionCommand]]