Skip to content

Commit 3122067

Browse files
committed
Poetry: Enable dynamic versioning based on git
1 parent a5c4404 commit 3122067

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

pyproject.toml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[project]
22
name = "saic-python-mqtt-gateway"
3-
version = "0.9.4"
43
description = "A service that queries the data from an MG iSMART account and publishes the data over MQTT and to other sources"
54
authors = [
65
{ name = "Giovanni Condello", email = "saic-python-client@nanomad.net" }
@@ -22,14 +21,20 @@ dependencies = [
2221
'inflection (>=0.5.1,<0.6.0)',
2322
'apscheduler (>=3.11.0,<4.0.0)',
2423
]
24+
dynamic = ["version"]
2525

2626
[project.urls]
2727
Homepage = "https://github.com/SAIC-iSmart-API/saic-python-mqtt-gateway"
2828
Issues = "https://github.com/SAIC-iSmart-API/saic-python-mqtt-gateway/issues"
2929

30+
[build-system]
31+
requires = ["poetry-core>=2.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
32+
build-backend = "poetry_dynamic_versioning.backend"
33+
3034
[tool.poetry]
3135
package-mode = false
3236
requires-poetry = '>=2.0,<3.0'
37+
version = "0.0.0"
3338

3439
[tool.poetry.group.dev.dependencies]
3540
pytest = "^8.2.2"
@@ -45,9 +50,14 @@ pylint = "^3.3.6"
4550
[tool.poetry.dependencies]
4651
saic-ismart-client-ng = { develop = true }
4752

48-
[build-system]
49-
requires = ["poetry-core>=2.0.0"]
50-
build-backend = "poetry.core.masonry.api"
53+
[tool.poetry.requires-plugins]
54+
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
55+
56+
[tool.poetry-dynamic-versioning]
57+
enable = true
58+
vcs = "git"
59+
style = "semver"
60+
pattern = "default-unprefixed"
5161

5262
[tool.pytest.ini_options]
5363
norecursedirs = ".git build dist"
@@ -250,4 +260,4 @@ score = false
250260
expected-line-ending-format = "LF"
251261

252262
[tool.pylint.EXCEPTIONS]
253-
overgeneral-exceptions = ["builtins.BaseException", "builtins.Exception"]
263+
overgeneral-exceptions = ["builtins.BaseException", "builtins.Exception"]

0 commit comments

Comments
 (0)