Skip to content

Commit 82d1d70

Browse files
committed
Set correct version during regen
1 parent 4f318f8 commit 82d1d70

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

doc/en/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ REGENDOC_ARGS := \
2727
--normalize "/in \d.\d\ds/in 0.12s/" \
2828
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
2929
--normalize "@pytest-(\d+)\\.[^ ,]+@pytest-\1.x.y@" \
30-
--normalize "@(This is pytest version )(\d+)\\.[^ ,]+@\1\2.x.y@" \
3130
--normalize "@py-(\d+)\\.[^ ,]+@py-\1.x.y@" \
3231
--normalize "@pluggy-(\d+)\\.[.\d,]+@pluggy-\1.x.y@" \
3332
--normalize "@hypothesis-(\d+)\\.[.\d,]+@hypothesis-\1.x.y@" \

scripts/release.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Invoke development tasks.
33
"""
44
import argparse
5+
import os
56
from pathlib import Path
67
from subprocess import call
78
from subprocess import check_call
@@ -65,10 +66,13 @@ def announce(version):
6566
check_call(["git", "add", str(target)])
6667

6768

68-
def regen():
69+
def regen(version):
6970
"""Call regendoc tool to update examples and pytest output in the docs."""
7071
print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs")
71-
check_call(["tox", "-e", "regen"])
72+
check_call(
73+
["tox", "-e", "regen"],
74+
env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION": version},
75+
)
7276

7377

7478
def fix_formatting():
@@ -88,13 +92,13 @@ def check_links():
8892
def pre_release(version, *, skip_check_links):
8993
"""Generates new docs, release announcements and creates a local tag."""
9094
announce(version)
91-
regen()
95+
regen(version)
9296
changelog(version, write_out=True)
9397
fix_formatting()
9498
if not skip_check_links:
9599
check_links()
96100

97-
msg = "Preparing release version {}".format(version)
101+
msg = "Prepare release version {}".format(version)
98102
check_call(["git", "commit", "-a", "-m", msg])
99103

100104
print()

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ commands =
9797

9898
[testenv:regen]
9999
changedir = doc/en
100-
skipsdist = True
101100
basepython = python3
101+
passenv = SETUPTOOLS_SCM_PRETEND_VERSION
102102
deps =
103103
dataclasses
104104
PyYAML

0 commit comments

Comments
 (0)