mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 14:30:24 +00:00
16 lines
583 B
JavaScript
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);
|