(lines, v: str)
| 812 | |
| 813 | |
| 814 | def _update_bazel_module_version(lines, v: str): |
| 815 | bazel_version = _normalize_cmake_version(v) |
| 816 | in_module = False |
| 817 | for index, line in enumerate(lines): |
| 818 | if re.search(r"^\s*module\(", line): |
| 819 | in_module = True |
| 820 | if in_module and re.search(r"^\s*version\s*=", line): |
| 821 | lines[index] = re.sub( |
| 822 | r'(version\s*=\s*")[^"]+(")', |
| 823 | r"\g<1>" + bazel_version + r"\2", |
| 824 | line, |
| 825 | ) |
| 826 | return lines |
| 827 | if in_module and ")" in line: |
| 828 | in_module = False |
| 829 | raise ValueError("No MODULE.bazel module version found") |
| 830 | |
| 831 | |
| 832 | def _update_go_mod_version(lines, v: str): |
nothing calls this directly
no test coverage detected