Skip to content

Commit

Permalink
Update process_and_convert.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzroe authored Apr 23, 2024
1 parent b221c1a commit 430da13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/process_and_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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)

0 comments on commit 430da13

Please sign in to comment.