From cc35f7cbd70677e13ef543f679722624c1085308 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 Sep 2016 22:12:13 -0400 Subject: Fix post generation --- autowaf.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/autowaf.py b/autowaf.py index cc0f8cb..62a3d89 100644 --- a/autowaf.py +++ b/autowaf.py @@ -919,9 +919,12 @@ def write_posts(entries, meta, out_dir, status='stable'): if 'description' in entry: post.write(' ' + entry['description']) - post.write('\n\nChanges:\n\n') - for i in entry['items']: - post.write(' * %s\n' % i) + post.write('\n') + if (len(entry['items']) > 0 and + not (len(entry['items']) == 1 and entry['items'][0] == 'Initial release')): + post.write('\nChanges:\n\n') + for i in entry['items']: + post.write(' * %s\n' % i) post.close() @@ -932,10 +935,10 @@ def get_blurb(in_file): f.readline() # Title underline f.readline() # Blank out = '' - line = '' + line = f.readline() while len(line) > 0 and line != '\n': - line = f.readline() out += line.replace('\n', ' ') + line = f.readline() return out.strip() def get_news(in_file, entry_props={}): -- cgit v1.2.1