Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2012-11-16 20:43:27 +0000
committerPhil Nash2012-11-16 20:43:27 +0000
commit0c90ab3572e91a6fc598bbabdb91c5f57c47b69d (patch)
tree75d93e3266877ef75133df25a00af81902087d9c
parentef60d54671981f86b0c94bd597f8acf8382b4ba2 (diff)
downloadcatch3-0c90ab3572e91a6fc598bbabdb91c5f57c47b69d.tar.gz
Added version number to README (and update it from script)
-rw-r--r--README3
-rw-r--r--generateSingleHeader.py13
2 files changed, 16 insertions, 0 deletions
diff --git a/README b/README
index 84859cf5..ba4f6cfc 100644
--- a/README
+++ b/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.
diff --git a/generateSingleHeader.py b/generateSingleHeader.py
index ba4243a2..835d7dad 100644
--- a/generateSingleHeader.py
+++ b/generateSingleHeader.py
@@ -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() )