mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-22 20:17:39 +08:00
🚸 添加发布工作流
This commit is contained in:
parent
e396db67ce
commit
079b940d8e
@ -11,13 +11,10 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
|||||||
from git import Repo
|
from git import Repo
|
||||||
from pdm.backend.hooks.version import SCMVersion
|
from pdm.backend.hooks.version import SCMVersion
|
||||||
|
|
||||||
try:
|
__commit__ = Repo(".").head.commit.hexsha
|
||||||
__commit__ = Repo(".").head.commit.hexsha
|
|
||||||
except:
|
|
||||||
__commit__ = "unknown"
|
|
||||||
|
|
||||||
__version__ = "6.3.5"
|
__version__ = "6.3.5"
|
||||||
|
|
||||||
|
|
||||||
def format_version(version: SCMVersion) -> str:
|
def format_version(version: SCMVersion) -> str:
|
||||||
return f"{__version__}+{__commit__[:7]}"
|
return f"{__version__}.dev{int(__commit__[:7], 16)}"
|
||||||
|
Loading…
Reference in New Issue
Block a user