Updated release script for README changes

This commit is contained in:
Phil Nash 2013-03-21 20:48:05 +00:00
parent f0a2a213ab
commit f155366cf2

View File

@ -14,7 +14,7 @@ seenHeaders = set([])
catchPath = os.path.realpath(os.path.dirname(sys.argv[0])) catchPath = os.path.realpath(os.path.dirname(sys.argv[0]))
rootPath = os.path.join( catchPath, 'include/' ) rootPath = os.path.join( catchPath, 'include/' )
versionPath = os.path.join( rootPath, "internal/catch_version.hpp" ) versionPath = os.path.join( rootPath, "internal/catch_version.hpp" )
readmePath = os.path.join( catchPath, "README" ) readmePath = os.path.join( catchPath, "README.md" )
#outputPath = os.path.join( catchPath, 'single_include/catch.hpp' ) #outputPath = os.path.join( catchPath, 'single_include/catch.hpp' )
bumpVersion = len(sys.argv) < 2 or sys.argv[1] <> "nobump" bumpVersion = len(sys.argv) < 2 or sys.argv[1] <> "nobump"
@ -82,8 +82,10 @@ class Version:
lines.append( line.rstrip() ) lines.append( line.rstrip() )
f.close() f.close()
f = open( readmePath, 'w' ) 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:
for line in lines[1:]: if line.startswith( "## CATCH" ):
f.write( '## CATCH v{0}.{1} build {2} ({3} branch)\n'.format( self.majorVersion, self.minorVersion, self.buildNumber, self.branchName ) )
else:
f.write( line + "\n" ) f.write( line + "\n" )
def generateSingleInclude(): def generateSingleInclude():