diff --git a/.gitignore b/.gitignore index 1124b9e7..b2c00f66 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ prompt.txt # pdm -.pdm-python \ No newline at end of file +.pdm-python +dist \ No newline at end of file diff --git a/liteyuki/__init__.py b/liteyuki/__init__.py index 2ff0eee6..b6fa9b4c 100644 --- a/liteyuki/__init__.py +++ b/liteyuki/__init__.py @@ -1,3 +1,5 @@ +from git import Repo + from liteyuki.bot import ( LiteyukiBot, get_bot, @@ -21,14 +23,16 @@ from liteyuki.log import ( ) __all__ = [ - "LiteyukiBot", - "get_bot", - "get_config", - "get_config_with_compat", - "Channel", - "Event", - "load_plugin", - "load_plugins", - "init_log", - "logger" -] \ No newline at end of file + "LiteyukiBot", + "get_bot", + "get_config", + "get_config_with_compat", + "Channel", + "Event", + "load_plugin", + "load_plugins", + "init_log", + "logger" +] + +__version__ = f"6.3.5+g{Repo('.').head.commit.hexsha}" diff --git a/pyproject.toml b/pyproject.toml index c4ad74b3..7ebdd8db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ # 此文件仅供 liteyuki 框架使用,请勿用于应用程序及nb-cli,请使用pip进行安装。 [project] name = "liteyukibot" -version = "6.3.2" +dynamic = ["version"] description = "A lightweight bot process management framework and application." readme = "README.md" requires-python = ">=3.10" @@ -33,4 +33,4 @@ requires = ["pdm-backend"] build-backend = "pdm.backend" [tool.pdm] -includes = ["liteyuki"] +packages = ["liteyuki"] \ No newline at end of file