🚸 添加发布工作流

This commit is contained in:
snowy 2024-08-18 04:18:20 +08:00
parent e396db67ce
commit 079b940d8e

View File

@ -11,13 +11,10 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
from git import Repo
from pdm.backend.hooks.version import SCMVersion
try:
__commit__ = Repo(".").head.commit.hexsha
except:
__commit__ = "unknown"
__commit__ = Repo(".").head.commit.hexsha
__version__ = "6.3.5"
def format_version(version: SCMVersion) -> str:
return f"{__version__}+{__commit__[:7]}"
return f"{__version__}.dev{int(__commit__[:7], 16)}"