Cleanup the helper scripts

* Remove from __future__ import print_function, because we
  no longer support Python2.
* Clean out unused parts of tools/scripts/scriptCommon.py
* Move appveyorMergeCoverageScript to Python3
* Update user reporting in *release scripts
* Cleanup module imports
This commit is contained in:
Martin Hořeňovský 2022-11-06 00:17:51 +01:00
parent d1ef461471
commit 297a17593f
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
12 changed files with 5 additions and 49 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
import glob
import subprocess

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python3
from __future__ import print_function
import io
import os
import sys

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python3
from __future__ import print_function
import os
import sys
import shutil

View File

@ -1,10 +1,9 @@
#!/usr/bin/env python3
from __future__ import print_function
import releaseCommon
v = releaseCommon.Version()
v.incrementBuildNumber()
releaseCommon.performUpdates(v)
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
print( "Updated files to v{0}".format( v.getVersionString() ) )

View File

@ -21,8 +21,6 @@
# to add the 'Introduced in Catch ...' snippets to the relevant pages.
#
from __future__ import print_function
import re

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python3
from __future__ import print_function
import os
from scriptCommon import catchPath

View File

@ -1,10 +1,9 @@
#!/usr/bin/env python3
from __future__ import print_function
import releaseCommon
v = releaseCommon.Version()
v.incrementMajorVersion()
releaseCommon.performUpdates(v)
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
print( "Updated files to v{0}".format( v.getVersionString() ) )

View File

@ -1,10 +1,9 @@
#!/usr/bin/env python3
from __future__ import print_function
import releaseCommon
v = releaseCommon.Version()
v.incrementMinorVersion()
releaseCommon.performUpdates(v)
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
print( "Updated files to v{0}".format( v.getVersionString() ) )

View File

@ -1,10 +1,9 @@
#!/usr/bin/env python3
from __future__ import print_function
import releaseCommon
v = releaseCommon.Version()
v.incrementPatchNumber()
releaseCommon.performUpdates(v)
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
print( "Updated files to v{0}".format( v.getVersionString() ) )

View File

@ -1,10 +1,6 @@
from __future__ import print_function
import os
import sys
import re
import string
import glob
import fnmatch
from scriptCommon import catchPath

View File

@ -1,31 +1,4 @@
import os
import sys
import subprocess
catchPath = os.path.dirname(os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))))
def getBuildExecutable():
if os.name == 'nt':
dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest.exe")
return dir
else:
dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest")
return dir
def runAndCapture( args ):
child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE)
lines = []
line = ""
while True:
out = child.stdout.read(1)
if out == '' and child.poll():
break
if out != '':
if out == '\n':
lines.append( line )
line = ""
else:
line = line + out
return lines

View File

@ -11,8 +11,6 @@
# https://github.com/rasbt/markdown-toclify
#
from __future__ import print_function
import argparse
import glob
import os