From 27047a82075225423f4c737f15807d71c2cd2332 Mon Sep 17 00:00:00 2001 From: Alexey Mironov Date: Wed, 27 May 2026 17:04:16 +0300 Subject: [PATCH 1/2] Add poetry-dynamic-versioning --- .github/workflows/ci.yaml | 11 +++++++++++ pyproject.toml | 20 +++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eb2c9d6..fe4c20e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6 + with: + fetch-depth: 0 + fetch-tags: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 @@ -80,6 +83,8 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 + fetch-tags: true - uses: actions/setup-python@v6 with: @@ -96,6 +101,8 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 + fetch-tags: true - name: Set up Python uses: actions/setup-python@v6 @@ -130,6 +137,8 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 + fetch-tags: true - name: Download artifact 📦 uses: actions/download-artifact@v8 @@ -159,6 +168,8 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 + fetch-tags: true - name: Download artifact 📦 uses: actions/download-artifact@v8 diff --git a/pyproject.toml b/pyproject.toml index f0480c1..ab991e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [project] name = "pysatl-criterion" -version = "1.0.0" +version = "0.0.0" +dynamic = ["version"] description = "Package with statistic criteria for PySATL" authors = [ {name = "PySATL Team", email = "pysatl@yahoo.com"}, @@ -28,6 +29,9 @@ Issues = "https://github.com/PySATL/pysatl-criterion/issues" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" +[tool.poetry.requires-plugins] +poetry-dynamic-versioning = { version = ">=1.8.0,<2.0.0", extras = ["plugin"] } + [tool.poetry] name = "pysatl_criterion" packages = [ @@ -97,3 +101,17 @@ exclude = [".git", "__pycache__", ".eggs", "user_data", ".venv", ".env"] "tests/**/*.py" = [ "S101", "S104", "S311", "S105", "S106", "S110" ] + +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "pep440" + +# Формат для НЕ tagged commits +format-jinja = """ +{%- if distance == 0 -%} + {{ base }} +{%- else -%} + {{ base }}.dev{{ distance }}+{{ commit }} +{%- endif -%} +""" \ No newline at end of file From a1cda88e63ca91418f3aedc86c9363da4143dfae Mon Sep 17 00:00:00 2001 From: Alexey Mironov Date: Wed, 27 May 2026 17:23:45 +0300 Subject: [PATCH 2/2] Add poetry-dynamic-versioning --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ab991e7..9187288 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,4 +114,4 @@ format-jinja = """ {%- else -%} {{ base }}.dev{{ distance }}+{{ commit }} {%- endif -%} -""" \ No newline at end of file +"""