(args)
| 65 | cppcheck_version = ','.join((v+['0','0','0','0'])[:4]) |
| 66 | |
| 67 | def check_sed(args): |
| 68 | file = args[-1] |
| 69 | res = re.match(r's/([^/]+)/.*', args[-2]) |
| 70 | if res is None: |
| 71 | raise Exception('Failed to verify sed call argument ' + args[-2]) |
| 72 | pattern = res.group(1) |
| 73 | if len(egrep([pattern, file])) < 4: |
| 74 | print(f"WARNING: pattern '{pattern}' not found in file {file}") |
| 75 | sed(args) |
| 76 | |
| 77 | check_sed(['-i', '-r', f's/version 2[.][0-9]+([.][0-9]+)*/version {new_version}/', 'cli/main.cpp']) |
| 78 | check_sed(['-i', '-r', f's/VERSION 2[.][0-9]+[.]99/VERSION {v3}/', 'CMakeLists.txt']) # version must have 3 parts. |
no test coverage detected