diff options
Diffstat (limited to '3rdparty/catch/scripts/releaseCommon.py')
-rw-r--r-- | 3rdparty/catch/scripts/releaseCommon.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/3rdparty/catch/scripts/releaseCommon.py b/3rdparty/catch/scripts/releaseCommon.py index 14eb235e5bf..236bfbd04dc 100644 --- a/3rdparty/catch/scripts/releaseCommon.py +++ b/3rdparty/catch/scripts/releaseCommon.py @@ -75,6 +75,8 @@ class Version: f.write( line + "\n" ) def updateReadmeFile(self): + versionParser = re.compile( r'\*v\d+\.\d+\.\d+\*' ) + downloadParser = re.compile( r'<a href=\"https://github.com/philsquared/Catch/releases/download/v\d+\.\d+\.\d+/catch.hpp\">' ) f = open( readmePath, 'r' ) lines = [] for line in f: @@ -82,8 +84,7 @@ class Version: f.close() f = open( readmePath, 'w' ) for line in lines: - if line.startswith( "*v" ): - f.write( '*v{0}*\n'.format( self.getVersionString() ) ) - else: - f.write( line + "\n" ) + line = versionParser.sub( '*v{0}*'.format(self.getVersionString()), line) + line = downloadParser.sub( r'<a href="https://github.com/philsquared/Catch/releases/download/v{0}/catch.hpp">'.format(self.getVersionString()) , line) + f.write( line + "\n" ) |