mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 21:29:54 +01:00
Do not assume that version placeholders contain ")"
This commit is contained in:
parent
071bacad5e
commit
1189a73be2
@ -127,8 +127,8 @@ def updateVersionDefine(version):
|
||||
def updateVersionPlaceholder(filename, version):
|
||||
with open(filename, 'rb') as file:
|
||||
lines = file.readlines()
|
||||
placeholderRegex = re.compile(b'\) in Catch X.Y.Z')
|
||||
replacement = '\) in Catch {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
|
||||
placeholderRegex = re.compile(b' in Catch X.Y.Z')
|
||||
replacement = ' in Catch {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
|
||||
with open(filename, 'wb') as file:
|
||||
for line in lines:
|
||||
file.write(placeholderRegex.sub(replacement, line))
|
||||
|
Loading…
Reference in New Issue
Block a user