Skip to content

Commit 0f2b8e2

Browse files
committed
feat: force update
1 parent 80d7281 commit 0f2b8e2

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

version-bump.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { readFileSync, writeFileSync } from "fs";
2+
3+
const targetVersion = process.env.npm_package_version;
4+
5+
// read minAppVersion from manifest.json and bump version to target version
6+
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
7+
const { minAppVersion } = manifest;
8+
manifest.version = targetVersion;
9+
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
10+
11+
// update versions.json with target version and minAppVersion from manifest.json
12+
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
13+
versions[targetVersion] = minAppVersion;
14+
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));

0 commit comments

Comments
 (0)