Skip to content

Commit

Permalink
Groups for same chips
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzroe committed May 7, 2024
1 parent c2f1657 commit 4c95f0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/scripts/process_and_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,24 @@ 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[:-1]) # Chip is everything before the date part
chip_mapping = {
"2652P_": "CC2652P",
"1352P_": "CC2652P",
"1352P7_": "CC2652P7",
"2652RB_": "CC2652RB"
}

current_chip = '_'.join(parts[:-1]) # Chip is everything before the date part

chip = None
for key, value in chip_mapping.items():
if key in current_chip:
chip = value
break

if chip is None:
chip = current_chip

version = parts[-1].split('.')[0] # Assuming the version is the last part before '.bin'
update_manifest(root, file, chip, version)

Expand Down

0 comments on commit 4c95f0a

Please sign in to comment.