diff --git a/scripts/project_update_config.py b/scripts/project_update_config.py index 9751680..39a2220 100644 --- a/scripts/project_update_config.py +++ b/scripts/project_update_config.py @@ -11,8 +11,18 @@ from utils.logger_utils import app_logger class ProjectUpdateConfig(Task): def update_config(self): + target_path = self.context.config_path + dst = os.path.join(self.context.temp_project_path, os.path.basename(target_path).replace(".zip", "")) + if not self.context.update_config: app_logger().info("配置文件没有更新") + + with open(os.path.join(dst, "tkg_config_mainly.properties"), 'rb') as f: + self.context.config = javaproperties.load(f) + + # 不打admob + if self.context.admob_app_id is None or self.context.admob_app_id == "": + self.context.admob_app_id = self.context.get_config("admob_id") return """ @@ -20,10 +30,6 @@ class ProjectUpdateConfig(Task): :return: """ - target_path = self.context.config_path - - dst = os.path.join(self.context.temp_project_path, os.path.basename(target_path).replace(".zip", "")) - if os.path.exists(dst): shutil.rmtree(dst)