sbuffkin_hexmaker/version-bump.mjs
isaprettycoolguy@protonmail.com 9a4b5d4254 init commit
2026-02-12 19:27:36 -05:00

16 lines
583 B
JavaScript

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);