MCPcopy Create free account
hub / github.com/apache/fory / _update_bazel_module_version

Function _update_bazel_module_version

ci/release.py:814–829  ·  view source on GitHub ↗
(lines, v: str)

Source from the content-addressed store, hash-verified

812
813
814def _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
832def _update_go_mod_version(lines, v: str):

Callers

nothing calls this directly

Calls 2

_normalize_cmake_versionFunction · 0.85
subMethod · 0.45

Tested by

no test coverage detected