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

Function _update_cmake_project_version

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

Source from the content-addressed store, hash-verified

795
796
797def _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
814def _update_bazel_module_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