feat: 添加版本号 v1.0.0 和版本管理功能
- 在 src/flask_prompt_master/__init__.py 添加 __version__ 和 __version_info__ - 创建 VERSION 文件存储版本号 - 更新所有环境配置(development/production/testing/local/base)在启动时显示版本信息 - 更新 README.md 文档添加版本号显示 版本号: v1.0.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,11 +53,11 @@ class DevelopmentConfig(Config):
|
||||
@staticmethod
|
||||
def init_app(app):
|
||||
Config.init_app(app)
|
||||
|
||||
|
||||
# 开发环境特定初始化
|
||||
import logging
|
||||
app.logger.setLevel(logging.DEBUG)
|
||||
|
||||
|
||||
# 开发环境控制台输出
|
||||
console_handler = logging.StreamHandler()
|
||||
console_handler.setLevel(logging.DEBUG)
|
||||
@@ -65,5 +65,12 @@ class DevelopmentConfig(Config):
|
||||
'%(asctime)s %(levelname)s: %(message)s'
|
||||
))
|
||||
app.logger.addHandler(console_handler)
|
||||
|
||||
app.logger.info('开发环境启动')
|
||||
|
||||
# 获取版本信息
|
||||
try:
|
||||
from src.flask_prompt_master import __version__
|
||||
version_info = f"版本: {__version__}"
|
||||
except ImportError:
|
||||
version_info = "版本: 未知"
|
||||
|
||||
app.logger.info(f'开发环境启动 - {version_info}')
|
||||
|
||||
Reference in New Issue
Block a user