Skip to content

Commit 3414c2e

Browse files
committed
Integrate into the build process
1 parent 1615b1d commit 3414c2e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,11 @@ repos:
111111
language: "python"
112112
files: '^peps/pep-\d{4}\.rst$'
113113
require_serial: true
114+
115+
# Hook to regenerate release schedules
116+
- id: "regen-schedules"
117+
name: "Regenerate release schedules from python-releases.toml"
118+
entry: "python -m release_engineering update-peps"
119+
language: "python"
120+
pass_filenames: false
121+
require_serial: true

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ test: venv
107107
spellcheck: _ensure-pre-commit
108108
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell
109109

110+
## regen-all to regenerate generated source files
111+
.PHONY: regen-all
112+
regen-all:
113+
$(PYTHON) -m release_engineering update-peps
114+
110115
.PHONY: help
111116
help : Makefile
112117
@echo "Please use \`make <target>' where <target> is one of"

pep_sphinx_extensions/pep_zero_generator/pep_index_generator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from pep_sphinx_extensions.pep_zero_generator import subindices
2727
from pep_sphinx_extensions.pep_zero_generator import writer
2828
from pep_sphinx_extensions.pep_zero_generator.constants import SUBINDICES_BY_TOPIC
29+
from release_engineering.generate_release_cycle import create_release_cycle
2930

3031
if TYPE_CHECKING:
3132
from sphinx.application import Sphinx
@@ -73,3 +74,6 @@ def create_pep_zero(app: Sphinx, env: BuildEnvironment, docnames: list[str]) ->
7374
subindices.generate_subindices(SUBINDICES_BY_TOPIC, peps, docnames, env)
7475

7576
write_peps_json(peps, Path(app.outdir))
77+
78+
release_cycle = create_release_cycle()
79+
app.outdir.joinpath('release-cycle.json').write_text(release_cycle, encoding="utf-8")

0 commit comments

Comments
 (0)