From a97c376349b68c3077e391528dd24a4bc1e745a0 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:59:14 -0400 Subject: [PATCH] Add a way to mutate JSON within manifests --- tools/build_project.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/build_project.py b/tools/build_project.py index ec8c865f..7da54683 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -470,6 +470,20 @@ def main(): LOGGER.error("Defines were unused, aborting: %s", unused_defines) sys.exit(1) + # JSON config + for json_config in manifest.get("json_config", []): + json_path = args.build_dir / json_config["file"] + + subprocess.run( + [ + "jq", + json_config["jq"], + json_path, + json_path, + ], + check=True, + ) + # Fix Gecko SDK bugs sl_rail_util_pti_config_h = args.build_dir / "config/sl_rail_util_pti_config.h"