From 5816d883ff3884ae96c3293b316f6d56c099eee0 Mon Sep 17 00:00:00 2001 From: Eric Fahlgren Date: Sun, 8 Mar 2026 13:45:42 -0700 Subject: [PATCH] build: segregate build artifacts by host architecture Add structured data to each of the build artifacts listed in profiles.json, in order to accomodate future inclusion of different build host architectures. Link: https://github.com/openwrt/openwrt/pull/22264#issuecomment-4014914414 Signed-off-by: Eric Fahlgren Link: https://github.com/openwrt/openwrt/pull/22331 Signed-off-by: Robert Marko --- scripts/json_overview_image_info.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index fe476e10fa7..c8d0e0ad452 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -5,6 +5,7 @@ from pathlib import Path from subprocess import run, PIPE from sys import argv import json +import re if len(argv) != 2: print("JSON info files script requires output file as argument") @@ -31,8 +32,12 @@ def get_initial_output(image_info): def add_artifact(artifact, prefix="openwrt-"): files = list(output_dir.glob(f"{prefix}{artifact}-*")) - if len(files) == 1: - output[artifact] = str(files[0].name) + if len(files): + output[artifact] = {} + for file in files: + file = str(file.name) + arch = re.match(r".*Linux-([^.]*)\.", file).group(1) + output[artifact][arch] = file for json_file in work_dir.glob("*.json"): -- 2.47.3