#926 Update Conan test version by release

Signed-off-by: Uilian Ries <uilianries@gmail.com>
This commit is contained in:
Uilian Ries 2017-06-27 11:03:27 -03:00 committed by Phil Nash
parent 0270afb21b
commit 7013e388f7
5 changed files with 20 additions and 0 deletions

View File

@ -8,5 +8,6 @@ v.incrementBuildNumber()
v.updateVersionFile() v.updateVersionFile()
v.updateReadmeFile() v.updateReadmeFile()
v.updateConanFile() v.updateConanFile()
v.updateConanTestFile()
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )

View File

@ -8,5 +8,6 @@ v.incrementMajorVersion()
v.updateVersionFile() v.updateVersionFile()
v.updateReadmeFile() v.updateReadmeFile()
v.updateConanFile() v.updateConanFile()
v.updateConanTestFile()
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )

View File

@ -8,5 +8,6 @@ v.incrementMinorVersion()
v.updateVersionFile() v.updateVersionFile()
v.updateReadmeFile() v.updateReadmeFile()
v.updateConanFile() v.updateConanFile()
v.updateConanTestFile()
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )

View File

@ -8,5 +8,6 @@ v.incrementPatchNumber()
v.updateVersionFile() v.updateVersionFile()
v.updateReadmeFile() v.updateReadmeFile()
v.updateConanFile() v.updateConanFile()
v.updateConanTestFile()
print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) )

View File

@ -12,6 +12,7 @@ rootPath = os.path.join( catchPath, 'include/' )
versionPath = os.path.join( rootPath, "internal/catch_version.hpp" ) versionPath = os.path.join( rootPath, "internal/catch_version.hpp" )
readmePath = os.path.join( catchPath, "README.md" ) readmePath = os.path.join( catchPath, "README.md" )
conanPath = os.path.join(catchPath, 'conanfile.py') conanPath = os.path.join(catchPath, 'conanfile.py')
conanTestPath = os.path.join(catchPath, 'test_package', 'conanfile.py')
class Version: class Version:
def __init__(self): def __init__(self):
@ -101,3 +102,18 @@ class Version:
f = open( conanPath, 'w' ) f = open( conanPath, 'w' )
for line in lines: for line in lines:
f.write( line + "\n" ) 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" )