Skip to content

Commit

Permalink
doc: Add date in release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse authored and jpakkane committed Dec 9, 2022
1 parent 2ec3fe7 commit 17c0a7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/genrelnotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import subprocess
import re
import shutil
import datetime
from pathlib import Path

RELNOTE_TEMPLATE = '''---
Expand Down Expand Up @@ -73,6 +74,10 @@ def generate(relnotes, to_version, source_dir, output_dir):
output.parent.mkdir(exist_ok=True, parents=True)
with output.open('w', encoding='utf-8') as ofile:
ofile.write(RELNOTE_TEMPLATE.format(title, to_version, title_suffix))
if not output_dir:
date = datetime.date.today()
date_str = date.strftime("%d %B %Y")
ofile.write(f'Meson {to_version} was released on {date_str}\n')
for snippetfile in sorted(Path(source_dir, 'markdown/snippets').glob('*.md')):
snippet = snippetfile.read_text(encoding='utf-8')
ofile.write(snippet)
Expand Down

0 comments on commit 17c0a7f

Please sign in to comment.