mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Added version number to README (and update it from script)
This commit is contained in:
parent
ef60d54671
commit
0c90ab3572
3
README
3
README
@ -1,3 +1,6 @@
|
||||
CATCH v0.9 build 2 (integration branch)
|
||||
---------------------------------------------
|
||||
|
||||
CATCH is an automated test framework for C, C++ and Objective-C.
|
||||
|
||||
This branch may contain code that is experimental or not yet fully tested.
|
||||
|
@ -14,6 +14,7 @@ seenHeaders = set([])
|
||||
catchPath = os.path.realpath(os.path.dirname(sys.argv[0]))
|
||||
rootPath = os.path.join( catchPath, 'include/' )
|
||||
versionPath = os.path.join( rootPath, "internal/catch_version.hpp" )
|
||||
readmePath = os.path.join( catchPath, "README" )
|
||||
#outputPath = os.path.join( catchPath, 'single_include/catch.hpp' )
|
||||
|
||||
def parseFile( path, filename ):
|
||||
@ -72,10 +73,22 @@ class Version:
|
||||
for line in lines:
|
||||
f.write( line + "\n" )
|
||||
|
||||
def updateReadmeFile(self):
|
||||
f = open( readmePath, 'r' )
|
||||
lines = []
|
||||
for line in f:
|
||||
lines.append( line.rstrip() )
|
||||
f.close()
|
||||
f = open( readmePath, 'w' )
|
||||
f.write( 'CATCH v{0}.{1} build {2} ({3} branch)\n'.format( self.majorVersion, self.minorVersion, self.buildNumber, self.branchName ) )
|
||||
for line in lines[1:]:
|
||||
f.write( line + "\n" )
|
||||
|
||||
def generateSingleInclude():
|
||||
v = Version()
|
||||
v.incrementBuildNumber()
|
||||
v.updateVersionFile()
|
||||
v.updateReadmeFile()
|
||||
print "/*"
|
||||
print " * CATCH v{0}.{1} build {2} ({3} branch)".format( v.majorVersion, v.minorVersion, v.buildNumber, v.branchName )
|
||||
print " * Generated: " + str( datetime.datetime.now() )
|
||||
|
Loading…
Reference in New Issue
Block a user