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

Function _update_pom_parent_version

ci/release.py:659–675  ·  view source on GitHub ↗
(lines, new_version)

Source from the content-addressed store, hash-verified

657
658
659def _update_pom_parent_version(lines, new_version):
660 start_index, end_index = -1, -1
661 for i, line in enumerate(lines):
662 if "<parent>" in line:
663 start_index = i
664 if "</parent>" in line:
665 end_index = i
666 break
667 assert start_index != -1
668 assert end_index != -1
669 for line_number in range(start_index, end_index):
670 line = lines[line_number]
671 if "version" in line:
672 line = re.sub(
673 r"(<version>)[^<>]+(</version>)", r"\g<1>" + new_version + r"\2", line
674 )
675 lines[line_number] = line
676
677
678def _update_android_tests_dependency_version(lines, new_version):

Callers

nothing calls this directly

Calls 1

subMethod · 0.45

Tested by

no test coverage detected