1
0
forked from bot/app

🚸 添加发布工作流

This commit is contained in:
远野千束 2024-08-18 04:22:03 +08:00
parent 079b940d8e
commit 137270b886
2 changed files with 7 additions and 2 deletions

View File

@ -20,6 +20,8 @@ from liteyuki.log import (
logger
)
from liteyuki.version import __version__
__all__ = [
"LiteyukiBot",
@ -32,6 +34,7 @@ __all__ = [
"load_plugins",
"init_log",
"logger",
"__version__"
]

View File

@ -8,13 +8,15 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@File : version.py.py
@Software: PyCharm
"""
from datetime import datetime
from git import Repo
from pdm.backend.hooks.version import SCMVersion
__commit__ = Repo(".").head.commit.hexsha
__datetime__ = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
__version__ = "6.3.5"
def format_version(version: SCMVersion) -> str:
return f"{__version__}.dev{int(__commit__[:7], 16)}"
return f"{__version__}.dev{__datetime__}"