added prettifyed version output
This commit is contained in:
@@ -76,6 +76,15 @@ def load_version(input_path) -> dict[str, int]:
|
|||||||
return prog_version
|
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:
|
def bump_patch(version_file) -> None:
|
||||||
"""Bumps the patch number of the given file by one."""
|
"""Bumps the patch number of the given file by one."""
|
||||||
# Get the version as dictionary
|
# Get the version as dictionary
|
||||||
@@ -189,7 +198,7 @@ if check_for_file(args.config):
|
|||||||
patch=args.patch,
|
patch=args.patch,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
print(load_version(file_path))
|
pretty_version(file_path)
|
||||||
|
|
||||||
if check_for_file(args.config) is False:
|
if check_for_file(args.config) is False:
|
||||||
request_to_create()
|
request_to_create()
|
||||||
|
|||||||
Reference in New Issue
Block a user