mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 08:47:45 -04:00
Update release script to upload source code zip (#676)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
4744787e55
commit
687c50f390
2 changed files with 81 additions and 3 deletions
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue