mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	Fix updateVersionPlaceholder when the placeholder starts the line
This commit is contained in:
		@@ -127,8 +127,8 @@ def updateVersionDefine(version):
 | 
			
		||||
def updateVersionPlaceholder(filename, version):
 | 
			
		||||
    with open(filename, 'rb') as file:
 | 
			
		||||
        lines = file.readlines()
 | 
			
		||||
    placeholderRegex = re.compile(b' in Catch[0-9]? X.Y.Z')
 | 
			
		||||
    replacement = ' in Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
 | 
			
		||||
    placeholderRegex = re.compile(b'in Catch[0-9]? X.Y.Z')
 | 
			
		||||
    replacement = 'in Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
 | 
			
		||||
    with open(filename, 'wb') as file:
 | 
			
		||||
        for line in lines:
 | 
			
		||||
            file.write(placeholderRegex.sub(replacement, line))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user