[PATCH 3/3] build/json: preserve existing profiles.json data
Moritz Warning
moritzwarning at web.de
Fri Jan 8 18:51:06 EST 2021
The OpenWrt Image Builder only builds images for one device per call.
This causes the profiles.json files to only contain the data of the
last device that was build.
Signed-off-by: Moritz Warning <moritzwarning at web.de>
---
scripts/json_overview_image_info.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index 7741154f61..47b5899981 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -18,6 +18,10 @@ assert getenv("WORK_DIR"), "$WORK_DIR required"
def get_output(work_dir):
output = None
+ # preserve existing profiles.json file data
+ if output_path.is_file():
+ output = json.loads(output_path.read_text())
+
for json_file in work_dir.glob("*.json"):
image_info = json.loads(json_file.read_text())
--
2.30.0
More information about the openwrt-devel
mailing list