Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Edit this page
Toggle table of contents sidebar

# pontos.version.commands package

class pontos.version.commands.VersionCommand(versioning_scheme)

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

  abstract get_current_version()

    Get the current version of this project

    Return type:

      Version

  abstract 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.

  abstract 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

  project_found()

    Returns True if a command has detected a corresponding project

    Return type:

      bool

class pontos.version.commands.CMakeVersionCommand(versioning_scheme)
  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

  get_current_version()

    Get the current version of this project

    Return type:

      Version

  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

  verify_version(version)

    Verify the current version of this project

  update_version(new_version, *, force=False)

    Update the current version of this project

    Return type:

      VersionUpdate

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

  verify_version(version)

    Verify the current version of this project

  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

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

    Get the current version of this project

    Return type:

      Version

  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.

  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

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

    Get the current version of this project

    Return type:

      Version

  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.

  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

class pontos.version.commands.CargoVersionCommand(versioning_scheme)
  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

  get_current_version()

    Get the current version of this project

    Return type:

      Version

  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.

pontos.version.commands.get_commands()

  Returns the available VersionCommands

  Return type:

    Iterable[Type[VersionCommand]]