mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-24 23:05:52 -04:00
Put the date in the heading of a pre release too.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user