Skip to content

Commit 2db92a2

Browse files
fix:
1 parent 0de1b84 commit 2db92a2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
next_version = versioningit.get_next_version(os.path.abspath(".."))
117117

118118
rst_prolog += f"""
119-
.. |next_version| replace:: {next_version}
119+
.. |vnext| replace:: {next_version}
120120
"""
121121

122122
_IS_READTHEDOCS = bool(os.getenv("READTHEDOCS"))

docs/extensions/versionchange.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# SPDX-License-Identifier: MIT
22
from __future__ import annotations
33

4+
import pathlib
45
from typing import TYPE_CHECKING
56

67
import sphinx.domains.changeset
8+
import versioningit
79

810
if TYPE_CHECKING:
911
from sphinx.application import Sphinx
@@ -18,8 +20,9 @@ def run(self):
1820
# If the argument is |vnext|, replace with config version
1921
if self.arguments and self.arguments[0] == "|vnext|":
2022
# Get the version from the Sphinx config
21-
version = self.env.config.next_version
22-
self.arguments[0] = version
23+
self.arguments[0] = versioningit.get_next_version(
24+
pathlib.Path(__file__).parent.parent.parent
25+
)
2326
return super().run()
2427

2528

docs/whats_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Changelog
1313
This page keeps a detailed human friendly rendering of what's new and changed
1414
in specific versions. Please see :ref:`version_guarantees` for more information.
1515

16-
.. towncrier-draft-entries:: |next_version| [UNRELEASED]
16+
.. towncrier-draft-entries:: |vnext| [UNRELEASED]
1717

1818
.. towncrier release notes start
1919

0 commit comments

Comments
 (0)