Automate release process

This commit is contained in:
Mike Thicke 2026-05-14 16:50:06 -04:00
parent 3aa38db57b
commit cc387825f7
2 changed files with 14 additions and 1 deletions

View file

@ -9,7 +9,8 @@
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"version": "node scripts/bump-version.mjs && git add manifest.json versions.json"
},
"author": "Epistemic Technology",
"license": "MIT",

12
scripts/bump-version.mjs Normal file
View file

@ -0,0 +1,12 @@
import { readFileSync, writeFileSync } from "fs";
const targetVersion = process.env.npm_package_version;
const manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
const { minAppVersion } = manifest;
manifest.version = targetVersion;
writeFileSync("manifest.json", JSON.stringify(manifest, null, 2) + "\n");
const versions = JSON.parse(readFileSync("versions.json", "utf8"));
versions[targetVersion] = minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, 2) + "\n");