Get the NEWS heading idiom right.
authorWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 21:43:01 +0000 (14:43 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 21:46:14 +0000 (14:46 -0700)
NEWS.md
packaging/release-rsync

diff --git a/NEWS.md b/NEWS.md
index a2d9f0f0fefa71d24067972807f681ca5407bdb1..e6c3365f51e7f930706a435365cb8aeff7836a18 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
-<a name="3.2.1pre1"></a>
+<a name="3.2.1"></a>
 
-# NEWS for rsync 3.2.1pre1 (21 Jun 2020)
+# NEWS for rsync 3.2.1 (UNRELEASED)
 
 Protocol: 31 (unchanged)
 
@@ -46,7 +46,9 @@ Protocol: 31 (unchanged)
    info (plus the status of a couple extra optimizations) by repeating the
    `--version` option (e.g. `-VV`).
 
- - Updated various URLs in the documentation to be https instead of http.
+ - Updated various URLs to be https instead of http.
+
+ - Some documentation improvements.
 
 ### PACKAGING RELATED:
 
index 3d78f3aee5d7fc2a4b48081963cc0a47c6301ae9..3afa79bd01eff898d783b0b557e7b04092156b1e 100755 (executable)
@@ -189,11 +189,11 @@ About to:
             txt = replace_or_die(x_re, repl, txt, f"Unable to find SUBPROTOCOL_VERSION define in {fn}")
         elif fn == 'NEWS.md':
             efv = re.escape(finalversion)
-            # The following refuses to match a 1.2.3 version without suffix because it was already released.
-            x_re = re.compile(r'^<.+>\s+# NEWS for rsync \d+\.\d+\.\d+[a-z].+\s+Protocol: .+\n')
-            repl = (f'<a name="{version}"></a>\n\n# NEWS for rsync {version} ({today})\n\n'
+            x_re = re.compile(r'^<.+>\s+# NEWS for rsync %s \(UNRELEASED\)\s+Protocol: .+\n' % efv)
+            rel_day = 'UNRELEASED' if pre else today
+            repl = (f'<a name="{finalversion}"></a>\n\n# NEWS for rsync {finalversion} ({rel_day})\n\n'
                 + f"Protocol: {protocol_version} ({proto_changed})\n")
-            good_top = repl.replace(version, version + 'dev')
+            good_top = re.sub(r'\(.*?\)', '(UNRELEASED)', repl, 1)
             msg = f"The top lines of {fn} are not in the right format.  It should be:\n" + good_top
             txt = replace_or_die(x_re, repl, txt, msg)
             x_re = re.compile(r'^(\| )(\S{2} \S{3} \d{4})(\s+\|\s+%s\s+\| ).{11}(\s+\| )\S{2}(\s+\|+)$' % efv, re.M)