[ci][client] Eth Python client automatically infer its version from tags

This commit is contained in:
Lucas PASCAL
2024-01-05 16:42:58 +01:00
parent b5e0c8759b
commit 99ba4a9eed
4 changed files with 14 additions and 49 deletions

View File

@@ -34,8 +34,12 @@ dependencies = [
[tools.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "ledger_app_clients.ethereum.__version__"}
[tool.setuptools_scm]
version_file = "src/ledger_app_clients/ethereum/__version__.py"
local_scheme = "no-local-version"
root = "../"
git_describe_command = "git describe --dirty --tags --long --match client-*[0-9]*"
fallback_version = "0.0.0"
[project.urls]
Home = "https://github.com/LedgerHQ/app-ethereum"

View File

@@ -1 +1,4 @@
__version__ = "0.2.0"
try:
from ledger_app_clients.ethereum.__version__ import __version__ # noqa
except ImportError:
__version__ = "unknown version" # noqa