forked from bot/app
🚸 添加发布工作流
This commit is contained in:
parent
079b940d8e
commit
137270b886
@ -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__"
|
||||
]
|
||||
|
||||
|
||||
|
@ -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__}"
|
||||
|
Loading…
Reference in New Issue
Block a user