sbuffkin_hexmaker/version-bump.mjs

17 lines
583 B
JavaScript
Raw Permalink Normal View History

2026-02-13 00:27:36 +00:00
import { readFileSync, writeFileSync } from "fs";
const targetVersion = process.env.npm_package_version;
const manifestPath = "manifest.json";
const versionsPath = "versions.json";
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
manifest.version = targetVersion;
writeFileSync(manifestPath, JSON.stringify(manifest, null, "\t"));
const versions = JSON.parse(readFileSync(versionsPath, "utf8"));
versions[targetVersion] = manifest.minAppVersion;
writeFileSync(versionsPath, JSON.stringify(versions, null, "\t"));
console.log("Bumped version to", targetVersion);