Skip to content

Commit 34732ec

Browse files
committed
single point of truth for the version
1 parent 823b196 commit 34732ec

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DEVPKGS=diff_cover black pylint pep257 pydocstyle flake8 tox virtualenv-pyenv \
3232
auto-walrus -rtest-requirements.txt -rmypy-requirements.txt
3333
DEBDEVPKGS=pylint python3-coverage sloccount \
3434
python3-flake8 shellcheck
35-
VERSION=1.2.11 # please also update pyproject.toml
35+
VERSION=$(shell grep __version__ cwlupgrader/__init__.py | awk -F\" '{ print $$2 }')
3636

3737
## all : default task (install cwl-upgrader in dev mode)
3838
all: dev

cwlupgrader/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
"""Transforms draft-3 CWL documents into v1.0 as idiomatically as possible."""
1+
"""Transforms draft-3 CWL documents into v1.0+ as idiomatically as possible."""
2+
__version__ = "1.2.11"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cwl-upgrader"
7-
version = "1.2.11" # Also update the Makefile
87
authors = [{name = "Common Workflow Language contributors", email = "[email protected]"}]
98
license = {text = "Apache 2.0"}
109
description = "Common Workflow Language standalone document upgrader"
@@ -33,6 +32,7 @@ dependencies = [
3332
"ruamel.yaml >= 0.16.0, < 0.19",
3433
"schema_salad",
3534
]
35+
dynamic = ["version"]
3636

3737
[project.urls]
3838
Homepage = "https://github.com/common-workflow-language/cwl-upgrader"
@@ -54,6 +54,9 @@ zip-safe = true
5454
include-package-data = true
5555
license-files = ["LICENSE.txt"]
5656

57+
[tool.setuptools.dynamic]
58+
version = {attr = "cwlupgrader.__version__"}
59+
5760
[tool.setuptools.package-data]
5861
"cwlupgrader.tests" = ["../testdata/**/*.cwl"]
5962

0 commit comments

Comments
 (0)