From d14142e412c3790ab312efc2f6e74674d5f3938c Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Thu, 25 Sep 2025 12:57:37 +0300 Subject: [PATCH] fix(tt_tool): create merged config right after creating user config This allows users to simply run `--create-user-config` and then manually harden with librelane using the generated config file. --- project.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/project.py b/project.py index b6f4a22..8aaa2eb 100644 --- a/project.py +++ b/project.py @@ -465,6 +465,12 @@ class Project: new_sources.append(s) self.sources = new_sources + def create_merged_config(self): + config = read_config("src/config") + user_config = read_config("src/user_config") + config.update(user_config) + write_config(config, "src/config_merged") + def create_user_config(self): if self.is_wokwi(): self.fetch_wokwi_files() @@ -485,6 +491,7 @@ class Project: "RT_MAX_LAYER": self.tech.project_top_metal_layer, } write_config(config, os.path.join(self.src_dir, "user_config"), ("json",)) + self.create_merged_config() def golden_harden(self): logging.info(f"hardening {self}") @@ -500,11 +507,7 @@ class Project: tt_version = self.get_tt_tools_version() workflow_url = self.get_workflow_url() - config = read_config("src/config") - user_config = read_config("src/user_config") - config.update(user_config) - write_config(config, "src/config_merged") - + self.create_merged_config() shutil.rmtree("runs/wokwi", ignore_errors=True) os.makedirs("runs/wokwi", exist_ok=True) arg_progress = "--hide-progress-bar" if "CI" in os.environ else ""