doc: Add date in release notes

pull/11011/head
Xavier Claessens 2 years ago committed by Jussi Pakkanen
parent 2ec3fe7a4a
commit 17c0a7f76a
  1. 5
      docs/genrelnotes.py

@ -20,6 +20,7 @@ import argparse
import subprocess
import re
import shutil
import datetime
from pathlib import Path
RELNOTE_TEMPLATE = '''---
@ -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)

Loading…
Cancel
Save