(filename, version)
| 112 | |
| 113 | |
| 114 | def updateVersionPlaceholder(filename, version): |
| 115 | with open(filename, 'rb') as file: |
| 116 | lines = file.readlines() |
| 117 | placeholderRegex = re.compile(b'Catch[0-9]? v?X.Y.Z') |
| 118 | replacement = 'Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii') |
| 119 | with open(filename, 'wb') as file: |
| 120 | for line in lines: |
| 121 | file.write(placeholderRegex.sub(replacement, line)) |
| 122 | |
| 123 | |
| 124 | def updateDocumentationVersionPlaceholders(version): |
no test coverage detected