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

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-01-26 13:12:14 +0100
committerMartin Hořeňovský2017-01-26 13:12:19 +0100
commit73872207db8b729f46e2991039eb808fdf6ebc53 (patch)
tree342a2d57e0cfa03313baee8ca323c2d9bc2a2b61 /scripts
parent51860f156831d3b49f5da63e08cbb068e98c4bdf (diff)
downloadcatch3-73872207db8b729f46e2991039eb808fdf6ebc53.tar.gz
Direct download link now links to latest release version
Also edited releaseCommon script to update the link in readme as well.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/releaseCommon.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/releaseCommon.py b/scripts/releaseCommon.py
index 14eb235e..236bfbd0 100644
--- a/scripts/releaseCommon.py
+++ b/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" )