(lines, v: str)
| 795 | |
| 796 | |
| 797 | def _update_cmake_project_version(lines, v: str): |
| 798 | cmake_version = _normalize_cmake_version(v) |
| 799 | in_project = False |
| 800 | for index, line in enumerate(lines): |
| 801 | if re.search(r"^\s*project\(", line): |
| 802 | in_project = True |
| 803 | if in_project and "VERSION" in line: |
| 804 | lines[index] = re.sub( |
| 805 | r"(VERSION\s+)([0-9]+(?:\.[0-9]+){1,2})", |
| 806 | r"\g<1>" + cmake_version, |
| 807 | line, |
| 808 | ) |
| 809 | if in_project and ")" in line: |
| 810 | in_project = False |
| 811 | return lines |
| 812 | |
| 813 | |
| 814 | def _update_bazel_module_version(lines, v: str): |
nothing calls this directly
no test coverage detected