Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

#926 Update Conan test version by release

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Commit
7013e388f758cad7455b6bd51f52c1fc9c910fd1
Author
Uilian Ries ·
Committer
Phil Nash
Parents
0270afb21b2c

Files · Download .tar.gz

Changes

 scripts/developBuild.py  |  1 +
 scripts/majorRelease.py  |  1 +
 scripts/minorRelease.py  |  1 +
 scripts/patchRelease.py  |  1 +
 scripts/releaseCommon.py | 16 ++++++++++++++++
 5 files changed, 20 insertions(+)

diff --git a/scripts/developBuild.py b/scripts/developBuild.py
index 3d3f6f0a..d751f108 100755
--- a/scripts/developBuild.py
+++ b/scripts/developBuild.py
@@ -8,5 +8,6 @@ v.incrementBuildNumber()
 v.updateVersionFile()
 v.updateReadmeFile()
 v.updateConanFile()
+v.updateConanTestFile()
 
 print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/majorRelease.py b/scripts/majorRelease.py
index 2341ecb5..e8116d3b 100755
--- a/scripts/majorRelease.py
+++ b/scripts/majorRelease.py
@@ -8,5 +8,6 @@ v.incrementMajorVersion()
 v.updateVersionFile()
 v.updateReadmeFile()
 v.updateConanFile()
+v.updateConanTestFile()
 
 print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/minorRelease.py b/scripts/minorRelease.py
index 585b7019..dff2d8c8 100755
--- a/scripts/minorRelease.py
+++ b/scripts/minorRelease.py
@@ -8,5 +8,6 @@ v.incrementMinorVersion()
 v.updateVersionFile()
 v.updateReadmeFile()
 v.updateConanFile()
+v.updateConanTestFile()
 
 print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/patchRelease.py b/scripts/patchRelease.py
index 312b4d5a..e33e4064 100755
--- a/scripts/patchRelease.py
+++ b/scripts/patchRelease.py
@@ -8,5 +8,6 @@ v.incrementPatchNumber()
 v.updateVersionFile()
 v.updateReadmeFile()
 v.updateConanFile()
+v.updateConanTestFile()
 
 print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/releaseCommon.py b/scripts/releaseCommon.py
index 16b5f199..9a62690d 100644
--- a/scripts/releaseCommon.py
+++ b/scripts/releaseCommon.py
@@ -12,6 +12,7 @@ rootPath = os.path.join( catchPath, 'include/' )
 versionPath = os.path.join( rootPath, "internal/catch_version.hpp" )
 readmePath = os.path.join( catchPath, "README.md" )
 conanPath = os.path.join(catchPath, 'conanfile.py')
+conanTestPath = os.path.join(catchPath, 'test_package', 'conanfile.py')
 
 class Version:
     def __init__(self):
@@ -101,3 +102,18 @@ class Version:
         f = open( conanPath, 'w' )
         for line in lines:
             f.write( line + "\n" )
+
+    def updateConanTestFile(self):
+        conanParser = re.compile( r'    requires = \"Catch\/\d+\.\d+\.\d+.*@%s\/%s\" % \(username, channel\)')
+        f = open( conanTestPath, 'r' )
+        lines = []
+        for line in f:
+            m = conanParser.match( line )
+            if m:
+                lines.append( '    requires = "Catch/{0}@%s/%s" % (username, channel)'.format(format(self.getVersionString())) )
+            else:
+                lines.append( line.rstrip() )
+        f.close()
+        f = open( conanTestPath, 'w' )
+        for line in lines:
+            f.write( line + "\n" )