diff --git a/.gitea/scripts/gui_version_creator.py b/.gitea/scripts/gui_version_creator.py index e95c44b..a31b52e 100644 --- a/.gitea/scripts/gui_version_creator.py +++ b/.gitea/scripts/gui_version_creator.py @@ -369,6 +369,11 @@ class DatabaseVersionManager: f"+{stats['lines_added']}/-{stats['lines_deleted']} 行") # 6. 创建版本记录 + # 生成下载地址(可配置) + # download_url = f"https://shuidrop.com/download/gui/v{next_version}" + # 如果需要临时测试,可以改为: + download_url = "https://www.baidu.com" + version_record = { 'version': next_version, 'update_type': update_type, @@ -378,6 +383,7 @@ class DatabaseVersionManager: 'commit_short_hash': commit_info['short_hash'], 'branch': commit_info['branch'], 'release_time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), + 'download_url': download_url, # 新增:下载地址 'stats': stats } @@ -405,6 +411,7 @@ class DatabaseVersionManager: logger.info(f"📦 版本号: v{next_version}") logger.info(f"📂 类型: {update_type.upper()}") logger.info(f"👤 作者: {commit_info['author']}") + logger.info(f"🔗 下载地址: {download_url}") logger.info(f"📈 变更: {stats['files_changed']} 文件, " f"+{stats['lines_added']}/-{stats['lines_deleted']} 行") logger.info(f"💾 数据库: {'✅ 成功' if db_success else '❌ 失败'}") diff --git a/config.py b/config.py index d5ac301..861edca 100644 --- a/config.py +++ b/config.py @@ -9,13 +9,13 @@ import json # 用于将令牌保存为 JSON 格式 # 后端服务器配置 # BACKEND_HOST = "192.168.5.233" -# BACKEND_HOST = "192.168.5.12" -BACKEND_HOST = "shuidrop.com" +BACKEND_HOST = "192.168.5.12" +# BACKEND_HOST = "shuidrop.com" # BACKEND_HOST = "test.shuidrop.com" -# BACKEND_PORT = "8000" -BACKEND_PORT = "" -# BACKEND_WS_URL = f"ws://{BACKEND_HOST}:{BACKEND_PORT}" -BACKEND_WS_URL = f"wss://{BACKEND_HOST}" +BACKEND_PORT = "8000" +# BACKEND_PORT = "" +BACKEND_WS_URL = f"ws://{BACKEND_HOST}:{BACKEND_PORT}" +# BACKEND_WS_URL = f"wss://{BACKEND_HOST}" # WebSocket配置 WS_CONNECT_TIMEOUT = 16.0