From e590f668e6b3025722c0cbc8000d37c35d4d4396 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Thu, 28 Aug 2025 18:28:40 +0200 Subject: [PATCH] fix(common): return default version if no tags exist in get_kiauh_version Signed-off-by: Dominik Willner --- kiauh/utils/common.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kiauh/utils/common.py b/kiauh/utils/common.py index 2e61e22..6ad2037 100644 --- a/kiauh/utils/common.py +++ b/kiauh/utils/common.py @@ -42,10 +42,13 @@ from utils.sys_utils import ( def get_kiauh_version() -> str: """ Helper method to get the current KIAUH version by reading the latest tag - :return: string of the latest tag + :return: string of the latest tag or a default value if no tags exist """ - lastest_tag: str = get_local_tags(Path(__file__).parent.parent)[-1] - return lastest_tag + tags = get_local_tags(Path(__file__).parent.parent) + if tags: + return tags[-1] + else: + return "v?.?.?" def convert_camelcase_to_kebabcase(name: str) -> str: