mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +00:00
Direct download link now links to latest release version
Also edited releaseCommon script to update the link in readme as well.
This commit is contained in:
parent
51860f1568
commit
73872207db
2 changed files with 6 additions and 5 deletions
|
@ -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" )
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue