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