diff options
| author | Martin Hořeňovský | 2021-12-02 11:48:50 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-12-02 11:48:50 +0100 |
| commit | c0976091151c5f31769ac991ca748021253bdba3 (patch) | |
| tree | ea0f06015e10ba1890f695f2e970349e24d0d75f | |
| parent | 9d6fffb92278452027a49a49f2deb3b83c203c17 (diff) | |
| download | catch3-c0976091151c5f31769ac991ca748021253bdba3.tar.gz | |
Cleanup release scripts a bit
| -rwxr-xr-x | tools/scripts/generateAmalgamatedFiles.py | 6 | ||||
| -rw-r--r-- | tools/scripts/releaseCommon.py | 37 |
2 files changed, 6 insertions, 37 deletions
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index eb96d2a9..9fc63a8f 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -103,9 +103,9 @@ def generate_cpp(): concatenate_file(cpp, file, False) print('Concatenated {} cpp files'.format(len(cpp_files))) - -generate_header() -generate_cpp() +if __name__ == "__main__": + generate_header() + generate_cpp() # Notes: 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 '[]' in line: - line = '[]({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) |