From 13a30fbf43df61c1eca4ec503e1e84ab1b8688f0 Mon Sep 17 00:00:00 2001 From: Arun Date: Feb 12 2025 13:19:28 +0000 Subject: #119 rpmdev-bumpspec is not bumping major version instead bumping minor version --- diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec index 5a6a909..b6c027e 100755 --- a/rpmdev-bumpspec +++ b/rpmdev-bumpspec @@ -59,6 +59,7 @@ class SpecFile(object): _tag_bump_patterns = ( re.compile(r"^Release\s*:\s*(\d+.*)", re.I), re.compile(r"^Release\s*:\s+%release_func\s+(\d+.*)", re.I), + re.compile(r"^Release\s*:\s+(%\{.*\})*(\d+.*)", re.I) ) # lines we don't want to mess with _skip_patterns = ( @@ -264,7 +265,9 @@ class SpecFile(object): return new def increase(self, match): - old = match.group(1) # only the release value + for m in match.groups(): + if re.compile(r'\d+.*').search(m): # only the release value + old = m try: if self.string is not None: new = self.increaseFallback(old)