MCPcopy
hub / github.com/MaaEnd/MaaEnd / _update_component_version

Function _update_component_version

tools/setup_workspace.py:318–329  ·  view source on GitHub ↗

更新 version.json 中单个组件的版本号

(
    install_root: Path,
    component_key: str,
    version: str,
)

Source from the content-addressed store, hash-verified

316
317
318def _update_component_version(
319 install_root: Path,
320 component_key: str,
321 version: str,
322) -> None:
323 """更新 version.json 中单个组件的版本号"""
324 if not version:
325 return
326 version_file = install_root / VERSION_FILE_NAME
327 versions = read_versions_file(version_file)
328 versions[component_key] = version
329 write_versions_file(version_file, versions)
330
331
332def parse_semver(version: str) -> tuple[list[int], list[str]]:

Callers 3

install_maafwFunction · 0.85
install_mxuFunction · 0.85
install_cpp_algoFunction · 0.85

Calls 2

read_versions_fileFunction · 0.85
write_versions_fileFunction · 0.85

Tested by

no test coverage detected