mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-08-13 08:34:36 +00:00
Update release script to upload source code zip (#676)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
committed by
GitHub
parent
4744787e55
commit
687c50f390
20
.github/scripts/packager.py
vendored
20
.github/scripts/packager.py
vendored
@@ -154,6 +154,26 @@ def prune_result_tree(path_root, exclude_files=[], dry_run=False):
|
||||
|
||||
return files_removed
|
||||
|
||||
def prune_result_tree_v2(tree_root, exclude_files=[], dry_run=False):
|
||||
'''
|
||||
Remove all files in 'exclude_files' from file tree.
|
||||
'''
|
||||
files_removed = []
|
||||
for root, dirs, files in os.walk(tree_root):
|
||||
for dir in dirs:
|
||||
if dir in exclude_files:
|
||||
path_full = os.path.join(root, dir)
|
||||
if not dry_run:
|
||||
shutil.rmtree(path_full)
|
||||
files_removed.append(path_full)
|
||||
for file in files:
|
||||
if file in exclude_files:
|
||||
path_full = os.path.join(root, file)
|
||||
if not dry_run:
|
||||
os.remove(path_full)
|
||||
files_removed.append(path_full)
|
||||
return files_removed
|
||||
|
||||
def zip_result_tree(path_tree, path_outzip):
|
||||
'''
|
||||
Zip file tree rooted at 'path_root', using same compression as 7z at max compression,
|
||||
|
||||
Reference in New Issue
Block a user