Skip to content

Commit

Permalink
Add support for Dunamai's Concern
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed May 19, 2023
1 parent 9f53714 commit c30bdf6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Unreleased

* Added:
* The plugin will print a warning for shallow Git repositories
(and any other `Concern`s reported by Dunamai in the future).
This becomes an error with `strict = true`.
* Changed:
* Updated Dunamai to 1.17.0+ for the latest features and bug fixes.

## v0.21.5 (2023-05-15)

* Fixed:
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions poetry_dynamic_versioning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import datetime as dt
import os
import re
import sys
from importlib import import_module
from pathlib import Path
from typing import Mapping, MutableMapping, Optional, Sequence
Expand Down Expand Up @@ -218,6 +219,9 @@ def _get_version(config: Mapping) -> str:
config["strict"],
)

for concern in version.concerns:
print("Warning: {}".format(concern.message()), file=sys.stderr)

if config["format-jinja"]:
if config["bump"] and version.distance > 0:
version = version.bump()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include = [

[tool.poetry.dependencies]
python = "^3.7"
dunamai = "^1.16.0"
dunamai = "^1.17.0"
tomlkit = ">= 0.4"
jinja2 = ">=2.11.1, <4"
poetry = { version = "^1.2.0", optional = true }
Expand Down

0 comments on commit c30bdf6

Please sign in to comment.