diff --git a/liteyuki/__init__.py b/liteyuki/__init__.py index b6fa9b4c..42dbab82 100644 --- a/liteyuki/__init__.py +++ b/liteyuki/__init__.py @@ -1,5 +1,3 @@ -from git import Repo - from liteyuki.bot import ( LiteyukiBot, get_bot, @@ -22,6 +20,7 @@ from liteyuki.log import ( logger ) + __all__ = [ "LiteyukiBot", "get_bot", @@ -32,7 +31,7 @@ __all__ = [ "load_plugin", "load_plugins", "init_log", - "logger" + "logger", ] -__version__ = f"6.3.5+g{Repo('.').head.commit.hexsha}" + diff --git a/pyproject.toml b/pyproject.toml index 21660273..893140fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,4 +34,9 @@ build-backend = "pdm.backend" [tool.pdm.build] includes = ["liteyuki/", "LICENSE", "README.md"] -excludes = ["tests/", "docs/", "src/"] \ No newline at end of file +excludes = ["tests/", "docs/", "src/"] + +[tool.pdm.version] +source = "scm" +tag_filter = "test/*" +tag_regex = '^test/(?:\D*)?(?P([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|c|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$)$' \ No newline at end of file