Set correct version during regen
This commit is contained in:
parent
d812690569
commit
64b19595a5
|
@ -27,7 +27,6 @@ REGENDOC_ARGS := \
|
|||
--normalize "/in \d.\d\ds/in 0.12s/" \
|
||||
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
|
||||
--normalize "@pytest-(\d+)\\.[^ ,]+@pytest-\1.x.y@" \
|
||||
--normalize "@(This is pytest version )(\d+)\\.[^ ,]+@\1\2.x.y@" \
|
||||
--normalize "@py-(\d+)\\.[^ ,]+@py-\1.x.y@" \
|
||||
--normalize "@pluggy-(\d+)\\.[.\d,]+@pluggy-\1.x.y@" \
|
||||
--normalize "@hypothesis-(\d+)\\.[.\d,]+@hypothesis-\1.x.y@" \
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
Invoke development tasks.
|
||||
"""
|
||||
import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
from subprocess import call
|
||||
from subprocess import check_call
|
||||
|
@ -65,10 +66,13 @@ def announce(version):
|
|||
check_call(["git", "add", str(target)])
|
||||
|
||||
|
||||
def regen():
|
||||
def regen(version):
|
||||
"""Call regendoc tool to update examples and pytest output in the docs."""
|
||||
print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs")
|
||||
check_call(["tox", "-e", "regen"])
|
||||
check_call(
|
||||
["tox", "-e", "regen"],
|
||||
env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION": version},
|
||||
)
|
||||
|
||||
|
||||
def fix_formatting():
|
||||
|
@ -88,13 +92,13 @@ def check_links():
|
|||
def pre_release(version, *, skip_check_links):
|
||||
"""Generates new docs, release announcements and creates a local tag."""
|
||||
announce(version)
|
||||
regen()
|
||||
regen(version)
|
||||
changelog(version, write_out=True)
|
||||
fix_formatting()
|
||||
if not skip_check_links:
|
||||
check_links()
|
||||
|
||||
msg = "Preparing release version {}".format(version)
|
||||
msg = "Prepare release version {}".format(version)
|
||||
check_call(["git", "commit", "-a", "-m", msg])
|
||||
|
||||
print()
|
||||
|
|
Loading…
Reference in New Issue