Permalink
Browse files

Fix script responsible for updating release link in the readme

  • Loading branch information...
horenmar committed Jan 10, 2018
1 parent cd76f57 commit 2bc33dd04d922429e1d843661bec78b7a697de2c
Showing with 3 additions and 3 deletions.
  1. +1 −1 README.md
  2. +2 −2 scripts/releaseCommon.py
View
@@ -7,7 +7,7 @@
[![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/nerce2MiN6sVmfCi)
<a href="https://github.com/catchorg/Catch2/releases/download/v2.0.1/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
<a href="https://github.com/catchorg/Catch2/releases/download/v2.1.0/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
## Catch2 is released!
View
@@ -80,7 +80,7 @@ def updateVersionFile(self):
def updateReadmeFile(version):
import updateWandbox
downloadParser = re.compile( r'<a href=\"https://github.com/philsquared/Catch/releases/download/v\d+\.\d+\.\d+/catch.hpp\">' )
downloadParser = re.compile( r'<a href=\"https://github.com/catchorg/Catch2/releases/download/v\d+\.\d+\.\d+/catch.hpp\">' )
success, wandboxLink = updateWandbox.uploadFiles()
if not success:
print('Error when uploading to wandbox: {}'.format(wandboxLink))
@@ -92,7 +92,7 @@ def updateReadmeFile(version):
f.close()
f = open( readmePath, 'w' )
for line in lines:
line = downloadParser.sub( r'<a href="https://github.com/philsquared/Catch/releases/download/v{0}/catch.hpp">'.format(version.getVersionString()) , line)
line = downloadParser.sub( r'<a href="https://github.com/catchorg/Catch2/releases/download/v{0}/catch.hpp">'.format(version.getVersionString()) , line)
if '[![Try online](https://img.shields.io/badge/try-online-blue.svg)]' in line:
line = '[![Try online](https://img.shields.io/badge/try-online-blue.svg)]({0})'.format(wandboxLink)
f.write( line + "\n" )

0 comments on commit 2bc33dd

Please sign in to comment.