mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Look just for 'Catch2 X.Y.Z' in doc placeholder update
This commit is contained in:
parent
d4e9fb8aa5
commit
1648c30ec3
@ -114,8 +114,8 @@ def updateVersionDefine(version):
|
|||||||
def updateVersionPlaceholder(filename, version):
|
def updateVersionPlaceholder(filename, version):
|
||||||
with open(filename, 'rb') as file:
|
with open(filename, 'rb') as file:
|
||||||
lines = file.readlines()
|
lines = file.readlines()
|
||||||
placeholderRegex = re.compile(b'in Catch[0-9]? X.Y.Z')
|
placeholderRegex = re.compile(b'Catch[0-9]? X.Y.Z')
|
||||||
replacement = 'in Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
|
replacement = 'Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
|
||||||
with open(filename, 'wb') as file:
|
with open(filename, 'wb') as file:
|
||||||
for line in lines:
|
for line in lines:
|
||||||
file.write(placeholderRegex.sub(replacement, line))
|
file.write(placeholderRegex.sub(replacement, line))
|
||||||
|
Loading…
Reference in New Issue
Block a user