Compare commits

..

3 Commits

Author SHA1 Message Date
skarasov
b385efbd77 Merge 6a766f7882 into e590f668e6 2025-08-29 16:28:06 -04:00
dw-0
e590f668e6 fix(common): return default version if no tags exist in get_kiauh_version
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2025-08-28 18:28:40 +02:00
skarasov
6a766f7882 Support of no id micro-controllers, see: [https://www.klipper3d.org/FAQ.html#wheres-my-serial-port] 2023-07-07 18:56:29 +03:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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:

View File

@@ -358,6 +358,7 @@ function get_usb_id() {
unset mcu_list
sleep 1
mcus=$(find /dev/serial/by-id/* 2>/dev/null)
mcus+=" $(find /dev/serial/by-path/* 2>/dev/null)"
for mcu in ${mcus}; do
mcu_list+=("${mcu}")