Skip to content

Commit

Permalink
rename yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
supperthomas committed Nov 4, 2024
1 parent ea7ee04 commit cc8415c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
File renamed without changes.
18 changes: 10 additions & 8 deletions tools/ci/bsp_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,21 @@ def build_bsp_attachconfig(bsp, attach_file):
print("::endgroup::")

yml_files_content = []
directory = os.path.join(rtt_root, 'bsp', bsp)
ci_file_path = os.path.join(directory, 'ci.yml')
if os.path.exists(ci_file_path):
with open(ci_file_path, 'r') as file:
content = yaml.safe_load(file)
yml_files_content.append(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)
print(f'{filename} 已加载')

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

for projects in yml_files_content:
for name, details in projects.items():

# 把kconfig 放到.config里面,然后执行scons编译
config_bacakup = config_file+'.origin'
shutil.copyfile(config_file, config_bacakup)
with open(config_file, 'a') as destination:
Expand Down

0 comments on commit cc8415c

Please sign in to comment.