mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
build: set up versioning with semantic-release
This commit is contained in:
14
scripts/update-manifest-version.js
Normal file
14
scripts/update-manifest-version.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const fs = require("fs");
|
||||
const path = "./manifest.json";
|
||||
|
||||
const version = process.env.npm_package_version;
|
||||
if (!version) {
|
||||
console.error("Version not found in npm_package_version.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const manifest = JSON.parse(fs.readFileSync(path, "utf8"));
|
||||
manifest.version = version;
|
||||
fs.writeFileSync(path, JSON.stringify(manifest, null, 2));
|
||||
|
||||
console.log(`Updated manifest.json to version ${version}`);
|
||||
Reference in New Issue
Block a user