Skip to content
Snippets Groups Projects

Only write changelog if there is a changelog to write

Merged John Swinbank requested to merge tickets/SDC-232 into master
1 file
+ 8
7
Compare changes
  • Side-by-side
  • Inline
+ 8
7
@@ -51,13 +51,14 @@ def get_all_tags():
def generate_change_record(tags):
output = StringIO()
output.write("\setDocChangeRecord{\n")
for tag in sorted(tags, key=lambda x: x.name, reverse=True):
if match(r"\d+\.\d+", tag.name):
output.write(f" \\addChangeRecord{{{escape_latex(tag.name)}}}")
output.write(f"{{{tag.date.strftime('%Y-%m-%d')}}}")
output.write(f"{{{escape_latex(tag.message)}}}\n")
output.write("}")
if tags:
output.write("\setDocChangeRecord{\n")
for tag in sorted(tags, key=lambda x: x.name, reverse=True):
if match(r"\d+\.\d+", tag.name):
output.write(f" \\addChangeRecord{{{escape_latex(tag.name)}}}")
output.write(f"{{{tag.date.strftime('%Y-%m-%d')}}}")
output.write(f"{{{escape_latex(tag.message)}}}\n")
output.write("}")
return output.getvalue()
Loading