🚸 添加发布工作流

This commit is contained in:
远野千束 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 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)}"