Simplify change log in release notes; Add separate script for updating changelog.
This commit is contained in:
parent
536beba583
commit
58c6024030
8 changed files with 115 additions and 44 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue