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

Function updateMesonFile

tools/scripts/releaseCommon.py:89–96  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

87
88
89def updateMesonFile(version):
90 with open(mesonPath, 'rb') as file:
91 lines = file.readlines()
92 replacementRegex = re.compile(b'''version\\s*:\\s*'(\\d+.\\d+.\\d+)', # CML version placeholder, don't delete''')
93 replacement = '''version: '{0}', # CML version placeholder, don't delete'''.format(version.getVersionString()).encode('ascii')
94 with open(mesonPath, 'wb') as file:
95 for line in lines:
96 file.write(replacementRegex.sub(replacement, line))
97
98
99def updateVersionDefine(version):

Callers 1

performUpdatesFunction · 0.85

Calls 2

getVersionStringMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected