This commit is contained in:
luojian 2025-10-28 10:45:14 +08:00
parent 5b309f8dbd
commit a88b1d0cd8
1 changed files with 10 additions and 4 deletions

View File

@ -11,8 +11,18 @@ from utils.logger_utils import app_logger
class ProjectUpdateConfig(Task): class ProjectUpdateConfig(Task):
def update_config(self): 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: if not self.context.update_config:
app_logger().info("配置文件没有更新") 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 return
""" """
@ -20,10 +30,6 @@ class ProjectUpdateConfig(Task):
:return: :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): if os.path.exists(dst):
shutil.rmtree(dst) shutil.rmtree(dst)