mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-14 13:47:24 +08:00
🚸 添加发布工作流
This commit is contained in:
parent
079b940d8e
commit
137270b886
@ -20,6 +20,8 @@ from liteyuki.log import (
|
|||||||
logger
|
logger
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from liteyuki.version import __version__
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"LiteyukiBot",
|
"LiteyukiBot",
|
||||||
@ -32,6 +34,7 @@ __all__ = [
|
|||||||
"load_plugins",
|
"load_plugins",
|
||||||
"init_log",
|
"init_log",
|
||||||
"logger",
|
"logger",
|
||||||
|
"__version__"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,13 +8,15 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
|||||||
@File : version.py.py
|
@File : version.py.py
|
||||||
@Software: PyCharm
|
@Software: PyCharm
|
||||||
"""
|
"""
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from git import Repo
|
from git import Repo
|
||||||
from pdm.backend.hooks.version import SCMVersion
|
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"
|
__version__ = "6.3.5"
|
||||||
|
|
||||||
|
|
||||||
def format_version(version: SCMVersion) -> str:
|
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