-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion-bump.mjs
More file actions
19 lines (15 loc) · 648 Bytes
/
Copy pathversion-bump.mjs
File metadata and controls
19 lines (15 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { readFileSync, writeFileSync } from "fs";
const targetVersion = process.argv[2];
if (!targetVersion) {
console.error("Please provide a target version");
process.exit(1);
}
// Read manifest and versions files
const manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
const versions = JSON.parse(readFileSync("versions.json", "utf8"));
// Update version in manifest
manifest.version = targetVersion;
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
// Update version in versions
versions[targetVersion] = manifest.minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));