]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Put the date in the heading of a pre release too.
authorWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 02:46:28 +0000 (19:46 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 02:46:28 +0000 (19:46 -0700)
packaging/pkglib.py
packaging/release-rsync

index 8badb46d1e0e5c5cbe9a5d6163f98f430406d9ea..628669b00ef5104064ed1e8698e9ecd292e77220 100644 (file)
@@ -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)
index 99d02b69b02c9d487004cdced88bd131a6e08664..7758a30ec0de932645f7938beaa0dcc221144ad7 100755 (executable)
@@ -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<a name="{version}"></a>\n\n# NEWS for rsync {version} ({rel_day})\n\n'
+            repl = ('-'*78 + f'\n<a name="{version}"></a>\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)