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

Method updateVersionFile

tools/scripts/releaseCommon.py:64–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 return versionString
63
64 def updateVersionFile(self):
65 f = open( versionPath, 'r' )
66 lines = []
67 for line in f:
68 m = versionParser.match( line )
69 if m:
70 lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) )
71 else:
72 lines.append( line.rstrip() )
73 f.close()
74 f = open( versionPath, 'w' )
75 for line in lines:
76 f.write( line + "\n" )
77
78
79def updateCmakeFile(version):

Callers 1

performUpdatesFunction · 0.80

Calls 3

matchMethod · 0.45
closeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected