diff --git a/manifest.json b/manifest.json index 879def46..9441d2ea 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "paperforge", "name": "PaperForge", - "version": "1.4.13", + "version": "1.4.15", "minAppVersion": "1.0.0", "description": "PaperForge — Zotero literature pipeline. Sync PDFs, run OCR, and read with AI-assisted deep reading.", "author": "Lin Zhaoxuan", diff --git a/scripts/bump.py b/scripts/bump.py index 58079dff..cf3849f9 100644 --- a/scripts/bump.py +++ b/scripts/bump.py @@ -21,7 +21,8 @@ ROOT = Path(__file__).resolve().parent.parent FILES_TO_UPDATE = { "__init__": ROOT / "paperforge" / "__init__.py", - "manifest": ROOT / "paperforge" / "plugin" / "manifest.json", + "plugin_manifest": ROOT / "paperforge" / "plugin" / "manifest.json", + "root_manifest": ROOT / "manifest.json", "versions": ROOT / "paperforge" / "plugin" / "versions.json", } diff --git a/scripts/sync-plugin-version.py b/scripts/sync-plugin-version.py index 6aa45078..a3fc5fe3 100644 --- a/scripts/sync-plugin-version.py +++ b/scripts/sync-plugin-version.py @@ -1,4 +1,4 @@ -"""Sync plugin manifest.json and versions.json from paperforge.__version__. +"""Sync plugin manifest.json, root manifest.json, and versions.json from paperforge.__version__. Keeps plugin metadata in sync with the single version source in __init__.py. """ @@ -6,17 +6,28 @@ import json from pathlib import Path from paperforge import __version__ -plugin_dir = Path(__file__).resolve().parent.parent / "paperforge" / "plugin" +ROOT = Path(__file__).resolve().parent.parent +plugin_dir = ROOT / "paperforge" / "plugin" -# manifest.json +# plugin/manifest.json manifest_path = plugin_dir / "manifest.json" manifest = json.loads(manifest_path.read_text(encoding="utf-8")) if manifest["version"] != __version__: manifest["version"] = __version__ manifest_path.write_text(json.dumps(manifest, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") - print(f"manifest.json: {manifest['version']} -> {__version__}") + print(f"plugin/manifest.json: {manifest['version']} -> {__version__}") else: - print(f"manifest.json: OK (v{__version__})") + print(f"plugin/manifest.json: OK (v{__version__})") + +# root manifest.json (Obsidian community plugin registry) +root_manifest_path = ROOT / "manifest.json" +root_manifest = json.loads(root_manifest_path.read_text(encoding="utf-8")) +if root_manifest["version"] != __version__: + root_manifest["version"] = __version__ + root_manifest_path.write_text(json.dumps(root_manifest, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + print(f"manifest.json (root): {root_manifest['version']} -> {__version__}") +else: + print(f"manifest.json (root): OK (v{__version__})") # versions.json vers_path = plugin_dir / "versions.json"