Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorUilian Ries2017-06-23 11:06:49 -0300
committerUilian Ries2017-06-23 16:03:36 -0300
commit34918045981bfb1cfe95741512ba3a3a61e40cd3 (patch)
treee85419a5d9303cce29e5a9cbcf07a2d13a836232 /scripts
parent6234e3d54d05982d4e01f2c77099a94a46921aa4 (diff)
downloadcatch3-34918045981bfb1cfe95741512ba3a3a61e40cd3.tar.gz
#926 Update Conan version by release
- Update release scripts to increment Conan version Signed-off-by: Uilian Ries <uilianries@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/developBuild.py3
-rwxr-xr-xscripts/majorRelease.py3
-rwxr-xr-xscripts/minorRelease.py3
-rwxr-xr-xscripts/patchRelease.py3
-rw-r--r--scripts/releaseCommon.py15
5 files changed, 23 insertions, 4 deletions
diff --git a/scripts/developBuild.py b/scripts/developBuild.py
index c16c8a6d..3d3f6f0a 100755
--- a/scripts/developBuild.py
+++ b/scripts/developBuild.py
@@ -7,5 +7,6 @@ v = Version()
v.incrementBuildNumber()
v.updateVersionFile()
v.updateReadmeFile()
+v.updateConanFile()
-print( "Updated Version.hpp and README to v{0}".format( v.getVersionString() ) ) \ No newline at end of file
+print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/majorRelease.py b/scripts/majorRelease.py
index f367506a..2341ecb5 100755
--- a/scripts/majorRelease.py
+++ b/scripts/majorRelease.py
@@ -7,5 +7,6 @@ v = Version()
v.incrementMajorVersion()
v.updateVersionFile()
v.updateReadmeFile()
+v.updateConanFile()
-print( "Updated Version.hpp and README to v{0}".format( v.getVersionString() ) ) \ No newline at end of file
+print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/minorRelease.py b/scripts/minorRelease.py
index ac36df96..585b7019 100755
--- a/scripts/minorRelease.py
+++ b/scripts/minorRelease.py
@@ -7,5 +7,6 @@ v = Version()
v.incrementMinorVersion()
v.updateVersionFile()
v.updateReadmeFile()
+v.updateConanFile()
-print( "Updated Version.hpp and README to v{0}".format( v.getVersionString() ) ) \ No newline at end of file
+print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/patchRelease.py b/scripts/patchRelease.py
index 878662f8..312b4d5a 100755
--- a/scripts/patchRelease.py
+++ b/scripts/patchRelease.py
@@ -7,5 +7,6 @@ v = Version()
v.incrementPatchNumber()
v.updateVersionFile()
v.updateReadmeFile()
+v.updateConanFile()
-print( "Updated Version.hpp and README to v{0}".format( v.getVersionString() ) ) \ No newline at end of file
+print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )
diff --git a/scripts/releaseCommon.py b/scripts/releaseCommon.py
index c49f7461..16b5f199 100644
--- a/scripts/releaseCommon.py
+++ b/scripts/releaseCommon.py
@@ -11,6 +11,7 @@ versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.
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')
class Version:
def __init__(self):
@@ -86,3 +87,17 @@ class Version:
line = downloadParser.sub( r'<a href="https://github.com/philsquared/Catch/releases/download/v{0}/catch.hpp">'.format(self.getVersionString()) , line)
f.write( line + "\n" )
+ def updateConanFile(self):
+ conanParser = re.compile( r' version = "\d+\.\d+\.\d+.*"')
+ f = open( conanPath, 'r' )
+ lines = []
+ for line in f:
+ m = conanParser.match( line )
+ if m:
+ lines.append( ' version = "{0}"'.format(format(self.getVersionString())) )
+ else:
+ lines.append( line.rstrip() )
+ f.close()
+ f = open( conanPath, 'w' )
+ for line in lines:
+ f.write( line + "\n" )