Auto tagging obsidian notes w/ AI
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
6let 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
12let versions = JSON.parse(readFileSync("versions.json", "utf8"));
13versions[targetVersion] = minAppVersion;
14writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));