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 committed Apr 23, 2024
1 parent 4fbdec8 commit 67bff87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/scripts/process_and_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,12 @@ def update_manifest(root, file, chip, version):
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)

def clean_directory(directory):
for root, dirs, files in os.walk(directory):
for file in files:
if not (file.endswith(".bin") or file == "manifest.json"):
os.remove(os.path.join(root, file))

# Calling the clean_directory function to remove unwanted files
clean_directory('ti')

0 comments on commit 67bff87

Please sign in to comment.