File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 116116next_version = versioningit .get_next_version (os .path .abspath (".." ))
117117
118118rst_prolog += f"""
119- .. |next_version | replace:: { next_version }
119+ .. |vnext | replace:: { next_version }
120120"""
121121
122122_IS_READTHEDOCS = bool (os .getenv ("READTHEDOCS" ))
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: MIT
22from __future__ import annotations
33
4+ import pathlib
45from typing import TYPE_CHECKING
56
67import sphinx .domains .changeset
8+ import versioningit
79
810if 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Changelog
1313This page keeps a detailed human friendly rendering of what's new and changed
1414in 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
You can’t perform that action at this time.
0 commit comments