From 564982919dcbcbfff0176af0758daadae7d50f4d Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 7 Aug 2020 14:51:03 -0400 Subject: [PATCH] Include version/date in changelog --- .config/generate_xml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/generate_xml.py b/.config/generate_xml.py index 386cae57..a51c4241 100644 --- a/.config/generate_xml.py +++ b/.config/generate_xml.py @@ -2,6 +2,7 @@ import xml.etree.ElementTree as ET import yaml import sys import os +from datetime import datetime def indent(elem, level=0): ''' @@ -52,11 +53,12 @@ addon_version = data.get('version') root.attrib['version'] = f'{addon_version}-{py_version}' # Changelog +date = datetime.today().strftime('%Y-%m-%d') changelog = data.get('changelog') for section in root.findall('extension'): news = section.findall('news') if news: - news[0].text = f'Changelog:\n{changelog}' + news[0].text = f'v{addon_version} ({date}):\n{changelog}' # Format xml tree indent(root)