pontos.version.commands package¶
- 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:
- 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)¶
- 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:
- 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:
- 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:
- 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:
- 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:
- class pontos.version.commands.JavaVersionCommand(versioning_scheme)¶
- 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:
- class pontos.version.commands.PoetryVersionCommand(versioning_scheme)¶
- get_version_from_pyproject_toml()¶
Return the version information from the [project] section or fall back to the [tool.poetry] section of the pyproject.toml file. The version may be in non standardized form.
- Return type:
- update_pyproject_version(new_version)¶
Update the version in the pyproject.toml file
- 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:
- project_found()¶
Returns True if a command has detected a corresponding project
- Return type:
bool
- class pontos.version.commands.ProjectType(*values)¶
- class pontos.version.commands.PythonVersionCommand(versioning_scheme)¶
- abstractmethod get_version_from_pyproject_toml()¶
Return the version information from the pyproject.toml file.
- Return type:
- abstractmethod update_pyproject_version(new_version)¶
Update the version in the pyproject.toml file
- update_version_file(new_version)¶
Update the version file with the new 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.UvVersionCommand(versioning_scheme)¶
- get_version_from_pyproject_toml()¶
Return the version information from the [project] section of the pyproject.toml file.
- Return type:
- update_pyproject_version(new_version)¶
Update the version in the pyproject.toml file
- 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:
- project_found()¶
Returns True if a command has detected a corresponding project
- Return type:
bool
- class pontos.version.commands.VersionCommand(versioning_scheme)¶
Generic class usable to implement the version commands for several programming languages
- 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.
- 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:
- project_found()¶
Returns True if a command has detected a corresponding project
- Return type:
bool
- pontos.version.commands.get_commands(names=None)¶
Returns the available VersionCommands
- Return type:
list[type[VersionCommand]]