MCPcopy Create free account
hub / github.com/catchorg/Catch2 / updateVersionPlaceholder

Function updateVersionPlaceholder

tools/scripts/releaseCommon.py:114–121  ·  view source on GitHub ↗
(filename, version)

Source from the content-addressed store, hash-verified

112
113
114def updateVersionPlaceholder(filename, version):
115 with open(filename, 'rb') as file:
116 lines = file.readlines()
117 placeholderRegex = re.compile(b'Catch[0-9]? v?X.Y.Z')
118 replacement = 'Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
119 with open(filename, 'wb') as file:
120 for line in lines:
121 file.write(placeholderRegex.sub(replacement, line))
122
123
124def updateDocumentationVersionPlaceholders(version):

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected