Skip to content

Commit 902ac10

Browse files
Merge pull request #2405 from VWS-Python/release-change-version
2 parents 3afeb51 + 23e17c2 commit 902ac10

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/source/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040
# Use ``importlib.metadata.version`` as per
4141
# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx.
4242
version = importlib.metadata.version(distribution_name=project)
43-
_month, _day, _year, *_ = version.split(sep=".")
44-
release = f"{_month}.{_day}.{_year}"
43+
# This method of getting the release from the version goes hand in hand with
44+
# the ``post-release`` versioning scheme chosen in the ``setuptools-scm``
45+
# configuration.
46+
release = version.split(".post")[0]
4547

4648

4749
project_metadata = importlib.metadata.metadata(distribution_name=project)

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ universal = true
137137
# This must be a PEP 440 compliant version.
138138
fallback_version = "0.0.0"
139139

140+
# This keeps the start of the version the same as the last release.
141+
# This is useful for our documentation to include e.g. binary links
142+
# to the latest released binary.
143+
#
144+
# Code to match this is in ``conf.py``.
145+
version_scheme = "post-release"
146+
140147
[tool.ruff]
141148
target-version = "py311"
142149

0 commit comments

Comments
 (0)