Simplify change log in release notes; Add separate script for updating changelog.

This commit is contained in:
be5invis 2020-10-23 20:49:52 -07:00
parent 536beba583
commit 58c6024030
8 changed files with 115 additions and 44 deletions

View file

@ -3,23 +3,23 @@
const path = require("path");
const fs = require("fs-extra");
const semver = require("semver");
const execMain = require("../shared/execMain");
const ChangeFileDir = path.join(__dirname, "../../changes");
const PackageJsonPath = path.join(__dirname, "../../package.json");
main().catch(e => {
console.error(e);
process.exit(1);
});
execMain(main);
///////////////////////////////////////////////////////////////////////////////////////////////////
async function main() {
const version = await GenerateChangeList();
const version = await GetLatestVersion();
const packageJson = await fs.readJson(PackageJsonPath);
packageJson.version = version;
await fs.writeJson(PackageJsonPath, packageJson, { spaces: 2 });
}
async function GenerateChangeList() {
async function GetLatestVersion() {
const changeFiles = await fs.readdir(ChangeFileDir);
const versions = new Set();
for (const file of changeFiles) {