Skip to content

Commit

Permalink
[action] Recursive folder lookup attachconfig.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hydevcode authored and supperthomas committed Nov 5, 2024
1 parent bdf5a1f commit fc765e2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tools/ci/bsp_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,15 @@ def build_bsp_attachconfig(bsp, attach_file):
yml_files_content = []
directory = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig')
if os.path.exists(directory):
for filename in os.listdir(directory):
if filename.endswith('attachconfig.yml'):
file_path = os.path.join(directory, filename)
if os.path.exists(file_path):
with open(file_path, 'r') as file:
content = yaml.safe_load(file)
yml_files_content.append(content)

for root, dirs, files in os.walk(directory):
for filename in files:
if filename.endswith('attachconfig.yml'):
file_path = os.path.join(root, filename)
if os.path.exists(file_path):
with open(file_path, 'r') as file:
content = yaml.safe_load(file)
yml_files_content.append(content)

config_file = os.path.join(rtt_root, 'bsp', bsp, '.config')

for projects in yml_files_content:
Expand Down

0 comments on commit fc765e2

Please sign in to comment.