MCPcopy
hub / github.com/anthropics/financial-services / base_version

Function base_version

scripts/version_bump.py:99–107  ·  view source on GitHub ↗

The plugin's version at the base ref, or None if it didn't exist there.

(base: str, plugin_json: Path)

Source from the content-addressed store, hash-verified

97
98
99def base_version(base: str, plugin_json: Path) -> str | None:
100 """The plugin's version at the base ref, or None if it didn't exist there."""
101 raw = git_ok("show", f"{base}:{rel(plugin_json)}")
102 if raw is None:
103 return None
104 try:
105 return json.loads(raw).get("version")
106 except json.JSONDecodeError:
107 return None
108
109
110def working_version(plugin_json: Path) -> str | None:

Callers 2

cmd_applyFunction · 0.85
cmd_checkFunction · 0.85

Calls 2

git_okFunction · 0.85
relFunction · 0.70

Tested by

no test coverage detected