Skip to content

Commit

Permalink
update header check
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Sep 29, 2024
1 parent faec3b7 commit 80011f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devscripts/commands/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def _validate_changelog(self, release: str) -> None:
with open(path, encoding="utf-8") as stream:
changelog = stream.read()
changelog_header = changelog.splitlines(keepends=True)[:3]
expected = f"""###################
expected = f"""##################
{release} ({date.today().strftime('%Y-%m-%d')})
###################\n""".splitlines(keepends=True)
##################\n""".splitlines(keepends=True)
if changelog_header != expected:
diff = difflib.unified_diff(changelog_header, expected, fromfile=str(path), tofile="expected")
raise CommandError(f"ChangeLog has improper header:\n\n{''.join(diff)}")
Expand Down

0 comments on commit 80011f0

Please sign in to comment.