INNER CODE UNIT · Python
save_json
softaworks/agent-toolkit · scripts/bump_version.py:55
def save_json(path: Path, data: dict) -> None:
"""Save a JSON file with proper formatting."""
with open(path, "w") as f:
json.dump(data, f, indent=2)
f.write("\n")
def bump_plugin_version(bump_type: str) -> None:
"""Bump the version in marketplace.json."""
root = get_root()
# Path
marketplace_path = root / ".claude-plugin" / "marketplace.json"
if not marketplace_path.exists():
print(f"✗ marketplace.json not found at {marketplace_path}")
sys.exit(1)