diff options
author | David Chalco <59750547+dachalco@users.noreply.github.com> | 2021-04-16 18:11:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 18:11:38 -0700 |
commit | 2560a50a7b54090136f3bef1d884a95356ef8474 (patch) | |
tree | e0caff1adb7a027f1438e1a899b84609333a484b | |
parent | 999e81e7214e4d91720810a3f915edc800838e08 (diff) | |
download | freertos-git-2560a50a7b54090136f3bef1d884a95356ef8474.tar.gz |
prune .git from versioning search (#561)
Co-authored-by: Archit Aggarwal <architag@amazon.com>
-rwxr-xr-x | .github/scripts/versioning.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/scripts/versioning.py b/.github/scripts/versioning.py index b4607cc2e..55a2715bc 100755 --- a/.github/scripts/versioning.py +++ b/.github/scripts/versioning.py @@ -69,7 +69,7 @@ def ask_yes_no_question(question): return answer -def list_files_in_a_component(component, afr_path, exclude_dirs=[], ext_filter=['.c', '.h'], exclude_hidden=True): +def list_files_in_a_component(component, afr_path, exclude_dirs=['.git'], ext_filter=['.c', '.h'], exclude_hidden=True): ''' Returns a list of all the files in a component. ''' @@ -81,6 +81,9 @@ def list_files_in_a_component(component, afr_path, exclude_dirs=[], ext_filter=[ if root in exclude_dirs: continue + # Prune excluded dirs + dirs[:] = [d for d in dirs if d not in exclude_dirs] + for f in files: if exclude_hidden and f[0] == '.': continue |