Skip to content

Commit 6bdb8f7

Browse files
Merge pull request #517 from MikroElektronika/IvanRuzavin-patch-2
Added guards to remove only 7z archives
2 parents a2499f0 + fd25a74 commit 6bdb8f7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/package.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ async def upload_release_asset(session, token, repo, release_id, asset_path, ass
580580
print(f'\033[92mUploaded asset: {os.path.basename(asset_path)} to release ID: {release_id}\033[0m')
581581

582582
# Remove the asset from local drive to avoid reaching the memory limit
583-
if os.path.exists(asset_path):
583+
if os.path.exists(asset_path) and '.7z' in asset_path:
584584
print(f'\033[93mRemoved asset {os.path.basename(asset_path)} locally on running machine\033[0m')
585585
os.remove(asset_path)
586586
return result

‎scripts/release_mcus.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ async def upload_release_asset(session, token, repo, tag_name, asset_path, delet
581581
print(f"\033[92mUpload completed for: {os.path.basename(asset_path)}.\033[0m")
582582

583583
# Remove the asset from local drive to avoid reaching the memory limit
584-
if os.path.exists(asset_path):
584+
if os.path.exists(asset_path) and '.7z' in asset_path:
585585
print(f'\033[93mRemoved asset {os.path.basename(asset_path)} locally on running machine\033[0m')
586586
os.remove(asset_path)
587587
return result

0 commit comments

Comments
 (0)