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

Function cmd_check

scripts/version_bump.py:167–187  ·  view source on GitHub ↗
(base: str)

Source from the content-addressed store, hash-verified

165
166
167def cmd_check(base: str) -> int:
168 violations = []
169 for pj in changed_plugins(base, staged_only=False):
170 work = working_version(pj)
171 bv = base_version(base, pj)
172 if not is_ahead(work, bv):
173 violations.append(
174 f"{rel(plugin_root(pj))}: changed but version not bumped "
175 f"({bv} -> {work}). Bump .claude-plugin/plugin.json version "
176 f"(or run scripts/check.py once to install the pre-commit hook)."
177 )
178 if violations:
179 print(
180 f"FAIL — {len(violations)} plugin(s) changed without a version bump:\n",
181 file=sys.stderr,
182 )
183 for v in violations:
184 print(f" ✗ {v}", file=sys.stderr)
185 return 1
186 print("OK — all changed plugins have a version bump.")
187 return 0
188
189
190def main() -> int:

Callers 1

mainFunction · 0.85

Calls 6

changed_pluginsFunction · 0.85
working_versionFunction · 0.85
base_versionFunction · 0.85
is_aheadFunction · 0.85
plugin_rootFunction · 0.85
relFunction · 0.70

Tested by

no test coverage detected