Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added version number to README (and update it from script)

Commit
0c90ab3572e91a6fc598bbabdb91c5f57c47b69d
Author
Phil Nash ·
Parents
ef60d5467198

Files · Download .tar.gz

Changes

 README                  |  3 +++
 generateSingleHeader.py | 13 +++++++++++++
 2 files changed, 16 insertions(+)

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() )