From: Wayne Davison Date: Mon, 22 Jun 2020 02:46:28 +0000 (-0700) Subject: Put the date in the heading of a pre release too. X-Git-Tag: v3.2.1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2564f25114955ed3ceaea7941b5d3173b7613ced;p=thirdparty%2Frsync.git Put the date in the heading of a pre release too. --- diff --git a/packaging/pkglib.py b/packaging/pkglib.py index 8badb46d..628669b0 100644 --- a/packaging/pkglib.py +++ b/packaging/pkglib.py @@ -218,8 +218,8 @@ def get_NEWS_version_info(): with open('NEWS.md', 'r', encoding='utf-8') as fh: for line in fh: - if not last_version: - m = re.search(r'rsync (\d+\.\d+\.\d+).*\d\d\d\d', line) + if not last_version: # Find the first non-dev|pre version with a release date. + m = re.search(r'rsync (\d+\.\d+\.\d+) .*\d\d\d\d', line) if m: last_version = m[1] m = rel_re.match(line) diff --git a/packaging/release-rsync b/packaging/release-rsync index 99d02b69..7758a30e 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -190,8 +190,7 @@ About to: elif fn == 'NEWS.md': efv = re.escape(finalversion) x_re = re.compile(r'^---+\n<.+>\s+# NEWS .+\s+Protocol: .+\n') - rel_day = 'UNRELEASED' if pre else today - repl = ('-'*78 + f'\n\n\n# NEWS for rsync {version} ({rel_day})\n\n' + repl = ('-'*78 + f'\n\n\n# NEWS for rsync {version} ({today})\n\n' + f"Protocol: {protocol_version} ({proto_changed})\n") msg = f"The top lines of {fn} are not in the right format. They must be:\n" + repl txt = replace_or_die(x_re, repl, txt, msg)