Skip to content

Commit 909fc32

Browse files
committed
Super robust/hacky fallbacks to the correct CI folder of /home/runner/Arduino/hardware/espressif/esp32/
1 parent b48303f commit 909fc32

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

build_platform.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,13 @@ def main():
519519
# Construct base platform path, fall back to architecture if vendor rebadged BSP.
520520
platform_base = os.path.join(data_dir, "packages", vendor, "hardware", architecture) if \
521521
os.path.exists(os.path.join(data_dir, "packages", vendor, "hardware", architecture)) else \
522-
os.path.join(data_dir, "packages", architecture, "hardware", architecture)
523-
522+
os.path.join(data_dir, "packages", architecture, "hardware", architecture) if \
523+
os.path.exists(os.path.join(data_dir, "packages", architecture, "hardware", architecture)) else \
524+
os.path.join(data_dir, "hardware", vendor, architecture) if \
525+
os.path.exists(os.path.join(data_dir, "hardware", vendor, architecture)) else \
526+
os.path.join(data_dir, "hardware",
527+
architecture, architecture)
528+
524529
# Find the latest version directory
525530
if os.path.exists(platform_base):
526531
versions = [d for d in os.listdir(platform_base) if os.path.isdir(os.path.join(platform_base, d))]
@@ -533,6 +538,9 @@ def main():
533538
dest_path = os.path.join(platform_path, "boards.local.txt")
534539
shutil.copyfile(boards_local_txt, dest_path)
535540
ColorPrint.print_info(f"Copied boards.local.txt to {dest_path}")
541+
elif os.path.exists(os.path.join(platform_base, "boards.txt")):
542+
shutil.copyfile(boards_local_txt, os.path.join(platform_base, "boards.local.txt"))
543+
ColorPrint.print_info(f"Copied boards.local.txt to {os.path.join(platform_base, 'boards.local.txt')}")
536544
else:
537545
ColorPrint.print_warn(f"No version directories found in {platform_base}")
538546
else:

0 commit comments

Comments
 (0)