summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/catch/scripts/releaseCommon.py
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-02-05 15:45:26 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-02-05 15:46:07 +0100
commit02c97cd0f7c4d630f1a90f9f2626746e47a28c09 (patch)
tree2b48d051a55f2b65525824546cd9fcf9e05907cf /3rdparty/catch/scripts/releaseCommon.py
parentd20b4ba6864b45d0c068d98d43e63c8bc5014a3b (diff)
Updated Catch to latest (nw)
Diffstat (limited to '3rdparty/catch/scripts/releaseCommon.py')
-rw-r--r--3rdparty/catch/scripts/releaseCommon.py9
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" )