Skip to content

Commit

Permalink
Use dynamic versioning with git tags
Browse files Browse the repository at this point in the history
  • Loading branch information
VannTen committed Sep 19, 2022
1 parent 6c78038 commit bdb2a98
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
7 changes: 6 additions & 1 deletion producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import click as cli

from version import __version__
from importlib.metadata import version, PackageNotFoundError

from thoth.common import __version__ as __common__version__
from thoth.common import init_logging
Expand All @@ -46,6 +46,11 @@
from thoth.python import AIOSource
from thoth.python.exceptions import NotFoundError

try:
__version__ = version("package-releases-job")
except PackageNotFoundError:
__version__ = "v0.11.10" # TODO makes this unnecessary by fixing users of the package

init_logging()

prometheus_registry = CollectorRegistry()
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ description = "Check packages updates on Python package indexes"
readme = "README.rst"
requires-python = ">=3.8"
license = {file = "LICENSE"}
version = "v0.11.10"
dynamic = ["version"]

[project.scripts]
package-releases-job = "producer:main"

[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools", "wheel", "setuptools_scm"]

[tool.setuptools_scm]

[tool.black]
line-length = 120
Expand Down
20 changes: 0 additions & 20 deletions version.py

This file was deleted.

0 comments on commit bdb2a98

Please sign in to comment.