mirror of
https://github.com/LukeHagar/sveltekit-electron-adapter.git
synced 2025-12-07 12:47:49 +00:00
[Release] v0.2.0
This commit is contained in:
31
scripts/changelog_release.ts
Normal file
31
scripts/changelog_release.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Version
|
||||
* =====================
|
||||
* Increment package.json version
|
||||
*
|
||||
* @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)
|
||||
*
|
||||
* @license: MIT License
|
||||
*
|
||||
*/
|
||||
import * as fs from "fs";
|
||||
import Logger from "@ptkdev/logger";
|
||||
|
||||
const logger = new Logger();
|
||||
|
||||
if (fs.existsSync("./CHANGELOG.md")) {
|
||||
fs.readFile("./CHANGELOG.md", "utf8", (error, data) => {
|
||||
if (error) {
|
||||
logger.error(JSON.stringify(error));
|
||||
}
|
||||
|
||||
const changelog = data.match(/\n([\s\S]*)-->\n/gm);
|
||||
changelog?.forEach((c) => {
|
||||
fs.writeFile("./CHANGELOG_RELEASE.txt", c, function writeJSON(error) {
|
||||
if (error) {
|
||||
logger.error(JSON.stringify(error));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user