fix(scripts): exclude debug directory from release scanning

This commit is contained in:
fujie
2026-01-28 02:30:38 +08:00
parent 4e32e1a1da
commit 163d8ce8bd
2 changed files with 10 additions and 2 deletions

View File

@@ -93,7 +93,11 @@ def scan_plugins_directory(plugins_dir: str) -> list[dict[str, Any]]:
return plugins return plugins
# Walk through all subdirectories # Walk through all subdirectories
for root, _dirs, files in os.walk(plugins_path): for root, dirs, files in os.walk(plugins_path):
# Exclude debug directory from scan
if "debug" in dirs:
dirs.remove("debug")
for file in files: for file in files:
if file.endswith(".py") and not file.startswith("__"): if file.endswith(".py") and not file.startswith("__"):
# Skip specific files that should not trigger release # Skip specific files that should not trigger release

View File

@@ -23,7 +23,11 @@ from openwebui_community_client import get_client
def find_existing_plugins(plugins_dir: str) -> list: def find_existing_plugins(plugins_dir: str) -> list:
"""查找所有已发布的插件文件(有 openwebui_id 的)""" """查找所有已发布的插件文件(有 openwebui_id 的)"""
plugins = [] plugins = []
for root, _, files in os.walk(plugins_dir): for root, dirs, files in os.walk(plugins_dir):
# Exclude debug directory
if "debug" in dirs:
dirs.remove("debug")
for file in files: for file in files:
if file.endswith(".py") and not file.startswith("__"): if file.endswith(".py") and not file.startswith("__"):
file_path = os.path.join(root, file) file_path = os.path.join(root, file)