fix finish_release.py on the 5.2.x point release branch (#10507)

this PR just cherry picks https://github.com/certbot/certbot/pull/10503
to the 5.2.x branch in case we need to do a point release to fix
https://github.com/certbot/certbot/issues/10506 or any other issues
This commit is contained in:
Brad Warren 2025-12-08 09:03:46 -08:00 committed by GitHub
parent 1127ac1cd7
commit d3c30cfb2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,7 +107,7 @@ def get_snap_revisions(snap, channel, version):
print('Getting revision numbers for', snap, version)
cmd = ['snapcraft', 'status', snap]
process = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True)
pattern = f'^\\s+{channel}\\s+{version}\\s+(\\d+)\\s*'
pattern = f'\\s+{channel}\\s+{version}\\s+(\\d+)\\s*'
revisions = re.findall(pattern, process.stdout, re.MULTILINE)
assert len(revisions) == SNAP_ARCH_COUNT, f'Unexpected number of snaps found for {channel} {snap} {version} (expected {SNAP_ARCH_COUNT}, found {len(revisions)})'
return revisions