uptime-kuma/extra/beta/reset-version.js
2022-03-20 11:08:33 +08:00

16 lines
370 B
JavaScript

const pkg = require("../../package.json");
const fs = require("fs");
const util = require("../../src/util");
util.polyfill();
const oldVersion = pkg.oldVersion;
if (!oldVersion) {
console.log("Error: no old version?");
process.exit(1);
}
delete pkg.oldVersion;
pkg.version = oldVersion;
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 4) + "\n");