westerngua_obsidian-zotero-.../version-bump.mjs
WesternGua 852fe4380c feat: sync v0.2.0 source repo layout
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
2026-05-03 12:52:35 +08:00

19 lines
726 B
JavaScript

import { readFileSync, writeFileSync } from "fs";
const packageJson = JSON.parse(readFileSync("package.json", "utf8"));
const manifestJson = JSON.parse(readFileSync("manifest.json", "utf8"));
const versionsJson = JSON.parse(readFileSync("versions.json", "utf8"));
const targetVersion = packageJson.version;
if (!targetVersion) {
throw new Error("package.json is missing a version field");
}
manifestJson.version = targetVersion;
writeFileSync("manifest.json", `${JSON.stringify(manifestJson, null, 2)}\n`);
versionsJson[targetVersion] = manifestJson.minAppVersion;
writeFileSync("versions.json", `${JSON.stringify(versionsJson, null, 2)}\n`);
console.log(`Synced manifest.json and versions.json to ${targetVersion}`);