Skip to content

Commit

Permalink
build: update doc markers that were scriv
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Sep 28, 2024
1 parent fc7f525 commit eb28456
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Unreleased
.. _issue 1863: https://github.com/nedbat/coveragepy/issues/1863


.. start-releases
.. _changes_7-6-1:

Expand Down
10 changes: 5 additions & 5 deletions igor.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def update_file(fname, pattern, replacement):


UNRELEASED = "Unreleased\n----------"
SCRIV_START = ".. scriv-start-here\n\n"
RELEASES_START = ".. start-releases\n\n"


def do_edit_for_release():
Expand All @@ -400,8 +400,8 @@ def do_edit_for_release():
rule = "-" * len(title)
new_head = f".. _changes_{facts.anchor}:\n\n{title}\n{rule}"

update_file("CHANGES.rst", re.escape(SCRIV_START), "")
update_file("CHANGES.rst", re.escape(UNRELEASED), SCRIV_START + new_head)
update_file("CHANGES.rst", re.escape(RELEASES_START), "")
update_file("CHANGES.rst", re.escape(UNRELEASED), RELEASES_START + new_head)

# doc/conf.py
new_conf = textwrap.dedent(
Expand All @@ -427,8 +427,8 @@ def do_bump_version():
# CHANGES.rst
update_file(
"CHANGES.rst",
re.escape(SCRIV_START),
f"{UNRELEASED}\n\nNothing yet.\n\n\n" + SCRIV_START,
re.escape(RELEASES_START),
f"{UNRELEASED}\n\nNothing yet.\n\n\n" + RELEASES_START,
)

# coverage/version.py
Expand Down

0 comments on commit eb28456

Please sign in to comment.