From 53edd3addf10e101b6da91b17a570c82c0917d4e Mon Sep 17 00:00:00 2001 From: abrahamgreyson Date: Thu, 12 Dec 2024 09:34:17 +0800 Subject: [PATCH] :ferris_wheel: ci: tag to version --- .gitignore | 2 ++ pyproject.toml | 3 +++ update_whitelist/__init__.py | 1 + 3 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index bd3f2b4..78fb788 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ update_whitelist.log* *.egg-info coverage.xml report.xml +# Generated version file +update_whitelist/_version.py \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f534bb0..0248363 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,3 +37,6 @@ build-backend = "setuptools.build_meta" [tool.pytest.ini_options] addopts = "--import-mode=importlib" pythonpath = ["."] + +[tool.setuptools_scm] +write_to = "update_whitelist/_version.py" \ No newline at end of file diff --git a/update_whitelist/__init__.py b/update_whitelist/__init__.py index b0fda56..7a24071 100644 --- a/update_whitelist/__init__.py +++ b/update_whitelist/__init__.py @@ -2,3 +2,4 @@ Author: abe Date: 2024/6/13 10:30:13 """ +from ._version import version as __version__ \ No newline at end of file