|
18 | 18 | Updates version in: |
19 | 19 | - skills/b2-cloud-storage/SKILL.md (frontmatter `metadata.version`) |
20 | 20 | - .claude-plugin/marketplace.json (`metadata.version` and every `plugins[].version`) |
| 21 | + - skills/b2-cloud-storage/.claude-plugin/plugin.json (`version`) |
21 | 22 |
|
22 | 23 | Rotates CHANGELOG.md: |
23 | 24 | - Moves the body of `## [Unreleased]` into a new `## [X.Y.Z] - YYYY-MM-DD` section. |
|
42 | 43 | REPO = Path(__file__).resolve().parent.parent |
43 | 44 | SKILL_MD = REPO / "skills" / "b2-cloud-storage" / "SKILL.md" |
44 | 45 | MARKETPLACE = REPO / ".claude-plugin" / "marketplace.json" |
| 46 | +PLUGIN_JSON = REPO / "skills" / "b2-cloud-storage" / ".claude-plugin" / "plugin.json" |
45 | 47 | CHANGELOG = REPO / "CHANGELOG.md" |
46 | 48 |
|
47 | 49 | SEMVER_RE = re.compile(r"^(\d+)\.(\d+)\.(\d+)$") |
@@ -96,6 +98,12 @@ def update_marketplace_json(new_version: str) -> None: |
96 | 98 | MARKETPLACE.write_text(json.dumps(data, indent=2) + "\n") |
97 | 99 |
|
98 | 100 |
|
| 101 | +def update_plugin_json(new_version: str) -> None: |
| 102 | + data = json.loads(PLUGIN_JSON.read_text()) |
| 103 | + data["version"] = new_version |
| 104 | + PLUGIN_JSON.write_text(json.dumps(data, indent=2) + "\n") |
| 105 | + |
| 106 | + |
99 | 107 | def rotate_changelog(new_version: str, previous_version: str) -> bool: |
100 | 108 | """Move `## [Unreleased]` body to a new `## [X.Y.Z] - YYYY-MM-DD` section. |
101 | 109 |
|
@@ -199,10 +207,12 @@ def main() -> None: |
199 | 207 |
|
200 | 208 | update_skill_md(new_version) |
201 | 209 | update_marketplace_json(new_version) |
| 210 | + update_plugin_json(new_version) |
202 | 211 | print(f" Updated {SKILL_MD.relative_to(REPO)}") |
203 | 212 | print(f" Updated {MARKETPLACE.relative_to(REPO)}") |
| 213 | + print(f" Updated {PLUGIN_JSON.relative_to(REPO)}") |
204 | 214 |
|
205 | | - files_to_stage: list[Path] = [SKILL_MD, MARKETPLACE] |
| 215 | + files_to_stage: list[Path] = [SKILL_MD, MARKETPLACE, PLUGIN_JSON] |
206 | 216 | if not args.no_changelog and rotate_changelog(new_version, current): |
207 | 217 | files_to_stage.append(CHANGELOG) |
208 | 218 |
|
|
0 commit comments