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..9187288 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 -%} +"""