Change nightly version format

This commit is contained in:
Louis Lam 2023-02-03 13:19:51 +08:00
parent b0673ba9ce
commit d39508a007

View file

@ -1,11 +1,12 @@
const pkg = require("../package.json"); const pkg = require("../package.json");
const fs = require("fs"); const fs = require("fs");
const util = require("../src/util"); const util = require("../src/util");
const dayjs = require("dayjs");
util.polyfill(); util.polyfill();
const oldVersion = pkg.version; const oldVersion = pkg.version;
const newVersion = oldVersion + "-nightly-" + util.genSecret(8); const newVersion = oldVersion + "-nightly-" + dayjs().format("YYYYMMDDHHmmss");
console.log("Old Version: " + oldVersion); console.log("Old Version: " + oldVersion);
console.log("New Version: " + newVersion); console.log("New Version: " + newVersion);