(base: str)
| 146 | |
| 147 | |
| 148 | def cmd_apply(base: str) -> int: |
| 149 | bumped = [] |
| 150 | for pj in changed_plugins(base, staged_only=True): |
| 151 | work = working_version(pj) |
| 152 | bv = base_version(base, pj) |
| 153 | if is_ahead(work, bv): |
| 154 | continue # already bumped on this branch — idempotent no-op |
| 155 | new = patch_bump(bv or work or "0.0.0") |
| 156 | data = json.loads(pj.read_text()) |
| 157 | data["version"] = new |
| 158 | pj.write_text(json.dumps(data, indent=2) + "\n") |
| 159 | git("add", rel(pj)) |
| 160 | bumped.append((rel(plugin_root(pj)), bv, new)) |
| 161 | |
| 162 | for name, old, new in bumped: |
| 163 | print(f"[version-bump] {name}: {old or '(new)'} -> {new}") |
| 164 | return 0 |
| 165 | |
| 166 | |
| 167 | def cmd_check(base: str) -> int: |
no test coverage detected