added prettifyed version output

This commit is contained in:
2025-10-16 18:16:15 +02:00
parent ecd460d3ad
commit 6cbb352efb

View File

@@ -76,6 +76,15 @@ def load_version(input_path) -> dict[str, int]:
return prog_version
def pretty_version(input_path) -> None:
"""Prints the version in a prettifyed format."""
prog_version = load_version(input_path)
pretty_version = (
f"{prog_version['major']}.{prog_version['minor']}.{prog_version['patch']}"
)
print(pretty_version)
def bump_patch(version_file) -> None:
"""Bumps the patch number of the given file by one."""
# Get the version as dictionary
@@ -189,7 +198,7 @@ if check_for_file(args.config):
patch=args.patch,
)
else:
print(load_version(file_path))
pretty_version(file_path)
if check_for_file(args.config) is False:
request_to_create()