Skip to content

Commit 9e2fc5e

Browse files
Test the branch update
1 parent 5a10fc9 commit 9e2fc5e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/update_board_changelog.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ def find_file(root_folder, filename):
2727

2828
write_output_to_file(os.path.join(os.getcwd(), 'sdk_tag.txt'), file_dir.split(os.path.sep)[-2][1:])
2929
else:
30-
write_output_to_file(os.path.join(os.getcwd(), 'sdk_tag.txt'), '0')
30+
# By default, always take the latest version
31+
from packaging.version import Version
32+
# Extract and sort versions, removing the 'v' prefix
33+
write_output_to_file(
34+
os.path.join(
35+
os.getcwd(),
36+
'sdk_tag.txt'
37+
),
38+
max(os.listdir(os.path.join(os.getcwd(), "changelog")),key=lambda v: Version(v.lstrip('v'))).lstrip('v')
39+
)

0 commit comments

Comments
 (0)