From 430da1330d3709657fbecf4584b004b4a454925a Mon Sep 17 00:00:00 2001 From: xyzroe Date: Tue, 23 Apr 2024 03:41:26 +0300 Subject: [PATCH] Update process_and_convert.py --- .github/scripts/process_and_convert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/process_and_convert.py b/.github/scripts/process_and_convert.py index e8da6fe..dd5cc51 100644 --- a/.github/scripts/process_and_convert.py +++ b/.github/scripts/process_and_convert.py @@ -20,7 +20,7 @@ def download_and_extract(url, extract_to): def update_manifest(root, file, chip, version): manifest_path = os.path.join('ti', 'manifest.json') - link = f"https://raw.githubusercontent.com/xyzroe/XZG/zb_fws/ti/{root}/{file}" + link = f"https://raw.githubusercontent.com/xyzroe/XZG/zb_fws/{root}/{file}" data = { chip: { file: { @@ -58,6 +58,6 @@ def update_manifest(root, file, chip, version): bin_path = os.path.join(root, file) # Extract chip and version from the file name parts = file.split('_') - chip = '_'.join(parts[:-3]) # Assumes the chip name is all parts before the last three parts - version = parts[-2] # Assumes the version is the second last part before '.bin' + chip = '_'.join(parts[:-1]) # Chip is everything before the date part + version = parts[-1].split('.')[0] # Assuming the version is the last part before '.bin' update_manifest(root, file, chip, version)