File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 21
21
import sys
22
22
from typing import Any , Dict , Optional
23
23
24
+ import versioningit
24
25
from sphinx .application import Sphinx
25
26
26
27
# If extensions (or modules to document with autodoc) are in another directory,
110
111
# The short X.Y version.
111
112
version = "." .join (release .split ("." )[:2 ])
112
113
114
+ next_version = versioningit .get_next_version (os .path .abspath (".." ))
115
+
116
+ rst_prolog += f"""
117
+ .. |next_version| replace:: { next_version }
118
+ """
113
119
114
120
_IS_READTHEDOCS = bool (os .getenv ("READTHEDOCS" ))
115
121
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Changelog
13
13
This page keeps a detailed human friendly rendering of what's new and changed
14
14
in specific versions. Please see :ref: `version_guarantees ` for more information.
15
15
16
- .. towncrier-draft-entries :: |release | [UNRELEASED]
16
+ .. towncrier-draft-entries :: |next_version | [UNRELEASED]
17
17
18
18
.. towncrier release notes start
19
19
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ docs = [
63
63
" towncrier==23.6.0" ,
64
64
" sphinx-notfound-page==0.8.3" ,
65
65
" sphinxext-opengraph==0.9.1" ,
66
+ " versioningit>=3.3.0" ,
66
67
]
67
68
68
69
[dependency-groups ]
You can’t perform that action at this time.
0 commit comments