diff --git a/pyvers/src/pyvers.py b/pyvers/src/pyvers.py index 1a0af50..a921575 100644 --- a/pyvers/src/pyvers.py +++ b/pyvers/src/pyvers.py @@ -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()