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

Function updateCmakeFile

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

Source from the content-addressed store, hash-verified

77
78
79def updateCmakeFile(version):
80 with open(cmakePath, 'rb') as file:
81 lines = file.readlines()
82 replacementRegex = re.compile(b'''VERSION (\\d+.\\d+.\\d+) # CML version placeholder, don't delete''')
83 replacement = '''VERSION {0} # CML version placeholder, don't delete'''.format(version.getVersionString()).encode('ascii')
84 with open(cmakePath, 'wb') as file:
85 for line in lines:
86 file.write(replacementRegex.sub(replacement, line))
87
88
89def updateMesonFile(version):

Callers 1

performUpdatesFunction · 0.85

Calls 2

getVersionStringMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected