mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Cleanup release scripts a bit
This commit is contained in:
parent
9d6fffb922
commit
c097609115
@ -103,7 +103,7 @@ def generate_cpp():
|
|||||||
concatenate_file(cpp, file, False)
|
concatenate_file(cpp, file, False)
|
||||||
print('Concatenated {} cpp files'.format(len(cpp_files)))
|
print('Concatenated {} cpp files'.format(len(cpp_files)))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
generate_header()
|
generate_header()
|
||||||
generate_cpp()
|
generate_cpp()
|
||||||
|
|
||||||
|
@ -78,26 +78,6 @@ class Version:
|
|||||||
for line in lines:
|
for line in lines:
|
||||||
f.write( line + "\n" )
|
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):
|
def updateCmakeFile(version):
|
||||||
with open(cmakePath, 'rb') as file:
|
with open(cmakePath, 'rb') as file:
|
||||||
@ -144,23 +124,12 @@ def updateDocumentationVersionPlaceholders(version):
|
|||||||
|
|
||||||
|
|
||||||
def performUpdates(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()
|
version.updateVersionFile()
|
||||||
updateVersionDefine(version)
|
updateVersionDefine(version)
|
||||||
|
|
||||||
# import generateSingleHeader
|
import generateAmalgamatedFile
|
||||||
# generateSingleHeader.generate(version)
|
generateAmalgamatedFile.generate_header()
|
||||||
|
generateAmalgamatedFile.generate_cpp()
|
||||||
|
|
||||||
# # 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)
|
|
||||||
|
|
||||||
# updateReadmeFile(version)
|
|
||||||
updateCmakeFile(version)
|
updateCmakeFile(version)
|
||||||
updateDocumentationVersionPlaceholders(version)
|
updateDocumentationVersionPlaceholders(version)
|
||||||
|
Loading…
Reference in New Issue
Block a user