Adjust release scripts for v3

This commit is contained in:
Martin Hořeňovský 2020-01-19 15:37:34 +01:00
parent 21868deeab
commit ec7280379e
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 13 additions and 13 deletions

View File

@ -10,8 +10,8 @@ import fnmatch
from scriptCommon import catchPath from scriptCommon import catchPath
versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' ) versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' )
rootPath = os.path.join( catchPath, 'include/' ) rootPath = os.path.join( catchPath, 'src/catch2' )
versionPath = os.path.join( rootPath, "internal/catch_version.cpp" ) versionPath = os.path.join( rootPath, "catch_version.cpp" )
definePath = os.path.join(rootPath, 'catch.hpp') definePath = os.path.join(rootPath, 'catch.hpp')
readmePath = os.path.join( catchPath, "README.md" ) readmePath = os.path.join( catchPath, "README.md" )
cmakePath = os.path.join(catchPath, 'CMakeLists.txt') cmakePath = os.path.join(catchPath, 'CMakeLists.txt')
@ -149,18 +149,18 @@ def performUpdates(version):
version.updateVersionFile() version.updateVersionFile()
updateVersionDefine(version) updateVersionDefine(version)
import generateSingleHeader # import generateSingleHeader
generateSingleHeader.generate(version) # generateSingleHeader.generate(version)
# Then copy the reporters to single include folder to keep them in sync # # 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, # # We probably should have some kind of convention to select which reporters need to be copied automagically,
# but this works for now # # but this works for now
import shutil # import shutil
for rep in ('automake', 'tap', 'teamcity', 'sonarqube'): # for rep in ('automake', 'tap', 'teamcity', 'sonarqube'):
sourceFile = os.path.join(catchPath, 'include/reporters/catch_reporter_{}.hpp'.format(rep)) # 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)) # destFile = os.path.join(catchPath, 'single_include', 'catch2', 'catch_reporter_{}.hpp'.format(rep))
shutil.copyfile(sourceFile, destFile) # shutil.copyfile(sourceFile, destFile)
updateReadmeFile(version) # updateReadmeFile(version)
updateCmakeFile(version) updateCmakeFile(version)
updateDocumentationVersionPlaceholders(version) updateDocumentationVersionPlaceholders(version)