mirror of
https://github.com/nymbo/Copy-Highlighter.git
synced 2026-07-22 06:56:52 +00:00
16 lines
555 B
JavaScript
16 lines
555 B
JavaScript
import { readFileSync, writeFileSync } from "fs";
|
|
|
|
const targetVersion = process.env.npm_package_version;
|
|
|
|
if (!targetVersion) {
|
|
throw new Error("No package version found.");
|
|
}
|
|
|
|
const manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
|
|
const versions = JSON.parse(readFileSync("versions.json", "utf8"));
|
|
|
|
manifest.version = targetVersion;
|
|
versions[targetVersion] = manifest.minAppVersion;
|
|
|
|
writeFileSync("manifest.json", `${JSON.stringify(manifest, null, "\t")}\n`);
|
|
writeFileSync("versions.json", `${JSON.stringify(versions, null, "\t")}\n`);
|