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

summaryrefslogtreecommitdiffhomepage
path: root/tools/scripts/releaseCommon.py
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-12-02 11:48:50 +0100
committerMartin Hořeňovský2021-12-02 11:48:50 +0100
commitc0976091151c5f31769ac991ca748021253bdba3 (patch)
treeea0f06015e10ba1890f695f2e970349e24d0d75f /tools/scripts/releaseCommon.py
parent9d6fffb92278452027a49a49f2deb3b83c203c17 (diff)
downloadcatch3-c0976091151c5f31769ac991ca748021253bdba3.tar.gz
Cleanup release scripts a bit
Diffstat (limited to 'tools/scripts/releaseCommon.py')
-rw-r--r--tools/scripts/releaseCommon.py37
1 files changed, 3 insertions, 34 deletions
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py
index 925e8014..23ae96cb 100644
--- a/tools/scripts/releaseCommon.py
+++ b/tools/scripts/releaseCommon.py
@@ -78,26 +78,6 @@ class Version:
for line in lines:
f.write( line + "\n" )
-def updateReadmeFile(version):
- import updateWandbox
-
- 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))
- exit(1)
- f = open( readmePath, 'r' )
- lines = []
- for line in f:
- lines.append( line.rstrip() )
- f.close()
- f = open( readmePath, 'w' )
- for line in lines:
- 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" )
-
def updateCmakeFile(version):
with open(cmakePath, 'rb') as file:
@@ -144,23 +124,12 @@ def updateDocumentationVersionPlaceholders(version):
def performUpdates(version):
- # First update version file, so we can regenerate single header and
- # have it ready for upload to wandbox, when updating readme
version.updateVersionFile()
updateVersionDefine(version)
- # import generateSingleHeader
- # generateSingleHeader.generate(version)
-
- # # Then copy the reporters to single include folder to keep them in sync
- # # We probably should have some kind of convention to select which reporters need to be copied automagically,
- # # but this works for now
- # import shutil
- # for rep in ('automake', 'tap', 'teamcity', 'sonarqube'):
- # sourceFile = os.path.join(catchPath, 'include/reporters/catch_reporter_{}.hpp'.format(rep))
- # destFile = os.path.join(catchPath, 'single_include', 'catch2', 'catch_reporter_{}.hpp'.format(rep))
- # shutil.copyfile(sourceFile, destFile)
+ import generateAmalgamatedFile
+ generateAmalgamatedFile.generate_header()
+ generateAmalgamatedFile.generate_cpp()
- # updateReadmeFile(version)
updateCmakeFile(version)
updateDocumentationVersionPlaceholders(version)