✨ webui与resources支持git更新

This commit is contained in:
HibiKier
2025-08-01 17:01:21 +08:00
parent ab7aad0488
commit 56bb311c2b
9 changed files with 99 additions and 35 deletions
+11
View File
@@ -31,6 +31,17 @@ async def check_git() -> bool:
return False
async def clean_git(cwd: Path):
"""
清理git仓库
参数:
cwd: 工作目录
"""
await run_git_command("reset --hard", cwd)
await run_git_command("clean -xdf", cwd)
async def run_git_command(
command: str, cwd: Path | None = None
) -> tuple[bool, str, str]: