refactor(config): retire RuntimeSettingsCompat host usage

This commit is contained in:
jxxghp
2026-08-26 15:55:21 +08:00
parent cdab54254d
commit 9dbe424c3d
162 changed files with 1966 additions and 1745 deletions
+2 -2
View File
@@ -29,13 +29,13 @@ def get_frontend_version(*, fallback_to_declared: bool = True) -> str | None:
"""返回当前部署的前端资源版本,并可关闭发布声明回退。"""
if is_frozen() and is_windows():
version_file = (
Path(get_runtime_setting("CONFIG_PATH")).parent
Path(get_runtime_setting('CONFIG_PATH')).parent
/ "nginx"
/ "html"
/ "version.txt"
)
else:
version_file = Path(get_runtime_setting("FRONTEND_PATH")) / "version.txt"
version_file = Path(get_runtime_setting('FRONTEND_PATH')) / "version.txt"
installed_version = _read_version_file(version_file)
if installed_version or not fallback_to_declared:
return installed_version