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,
112
113
# The short X.Y version.
113
114
version = "." .join (release .split ("." )[:2 ])
114
115
116
+ next_version = versioningit .get_next_version (os .path .abspath (".." ))
117
+
118
+ rst_prolog += f"""
119
+ .. |next_version| replace:: { next_version }
120
+ """
115
121
116
122
_IS_READTHEDOCS = bool (os .getenv ("READTHEDOCS" ))
117
123
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 @@ -64,6 +64,7 @@ docs = [
64
64
" towncrier==23.6.0" ,
65
65
" sphinx-notfound-page==0.8.3" ,
66
66
" sphinxext-opengraph==0.9.1" ,
67
+ " versioningit>=3.3.0" ,
67
68
]
68
69
69
70
[dependency-groups ]
You can’t perform that action at this time.
0 commit comments