Various AT Protocol integrations with obsidian
at main 17 lines 784 B view raw
1import { readFileSync, writeFileSync } from "fs"; 2 3const targetVersion = process.env.npm_package_version; 4 5// read minAppVersion from manifest.json and bump version to target version 6const manifest = JSON.parse(readFileSync("manifest.json", "utf8")); 7const { minAppVersion } = manifest; 8manifest.version = targetVersion; 9writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t")); 10 11// update versions.json with target version and minAppVersion from manifest.json 12// but only if the target version is not already in versions.json 13const versions = JSON.parse(readFileSync('versions.json', 'utf8')); 14if (!Object.values(versions).includes(minAppVersion)) { 15 versions[targetVersion] = minAppVersion; 16 writeFileSync('versions.json', JSON.stringify(versions, null, '\t')); 17}