mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
#926 Update Conan test version by release
Signed-off-by: Uilian Ries <uilianries@gmail.com>
This commit is contained in:
parent
0270afb21b
commit
7013e388f7
@ -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() ) )
|
||||
|
@ -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() ) )
|
||||
|
@ -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() ) )
|
||||
|
@ -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() ) )
|
||||
|
@ -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" )
|
||||
|
Loading…
Reference in New Issue
Block a user