Explorar el Código

fix(Deploy): Fix Repository URL migration to apply after user config merge

ryland hace 5 meses
padre
commit
5cf5c3724c
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  1. 4 3
      deploy/config.py
  2. 1 1
      deploy/template

+ 4 - 3
deploy/config.py

@@ -88,13 +88,14 @@ class DeployConfig(ConfigModel):
         logger.info(f"Rest of the configs are the same as default")
 
     def read(self):
-        self.config = poor_yaml_read(DEPLOY_TEMPLATE)
+        self.config_template = poor_yaml_read(DEPLOY_TEMPLATE)
+        self.config = copy.deepcopy(self.config_template)
+        self.config.update(poor_yaml_read(self.file))
+
         # https://e.coding.net/onmyojiautoscript/oas/OnmyojiAutoScript.git
         # 2025.09.01 腾讯coding跑路了
         if self.config["Repository"].startswith("https://e.coding.net/"):
             self.config["Repository"] = "https://gitcode.com/OnmyojiAutoScript/OnmyojiAutoScript.git"
-        self.config_template = copy.deepcopy(self.config)
-        self.config.update(poor_yaml_read(self.file))
 
         for key, value in self.config.items():
             if hasattr(self, key):

+ 1 - 1
deploy/template

@@ -3,7 +3,7 @@ Deploy:
     # URL of AzurLaneAutoScript repository
     # [CN user] Use 'https://gitee.com/lmeszinc/azur-lane-auto-script-mirror' for faster and more stable download
     # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript'
-    Repository: https://e.coding.net/onmyojiautoscript/oas/OnmyojiAutoScript.git
+    Repository: https://gitcode.com/OnmyojiAutoScript/OnmyojiAutoScript.git
     # Branch of Alas
     # [Developer] Use 'dev', 'app', etc, to try new features
     # [Other] Use 'master', the stable branch