summaryrefslogtreecommitdiff
path: root/packaging/release-rsync
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/release-rsync')
-rwxr-xr-xpackaging/release-rsync4
1 files changed, 3 insertions, 1 deletions
diff --git a/packaging/release-rsync b/packaging/release-rsync
index d484628c..5e54d06e 100755
--- a/packaging/release-rsync
+++ b/packaging/release-rsync
@@ -193,7 +193,9 @@ About to:
with open(fn, 'r', encoding='utf-8') as fh:
old_txt = txt = fh.read()
if fn == 'version.h':
- txt = f'#define RSYNC_VERSION "{version}"\n'
+ x_re = re.compile(r'^(#define RSYNC_VERSION).*', re.M)
+ msg = f"Unable to update RSYNC_VERSION in {fn}"
+ txt = replace_or_die(x_re, r'\1 "%s"' % version, txt, msg)
elif '.spec' in fn:
for var, val in specvars.items():
x_re = re.compile(r'^%s .*' % re.escape(var), re.M)