aboutsummaryrefslogtreecommitdiff
path: root/scripts/getLatestChangelog.mjs
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-04-14 18:44:22 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-04-14 21:08:43 +0200
commitdbad7730f902cfc7bfddfe63afa357d92b0f9e92 (patch)
tree1d90477b42e71ba8cb01879f7a738ab9cebf211e /scripts/getLatestChangelog.mjs
parent85cb0ffabdb70c8983858720fb101d315f476bee (diff)
downloadit-tools-dbad7730f902cfc7bfddfe63afa357d92b0f9e92.tar.gz
it-tools-dbad7730f902cfc7bfddfe63afa357d92b0f9e92.tar.zst
it-tools-dbad7730f902cfc7bfddfe63afa357d92b0f9e92.zip
chore(release): create a github release on new version
Diffstat (limited to 'scripts/getLatestChangelog.mjs')
-rw-r--r--scripts/getLatestChangelog.mjs6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/getLatestChangelog.mjs b/scripts/getLatestChangelog.mjs
new file mode 100644
index 0000000..baafe9c
--- /dev/null
+++ b/scripts/getLatestChangelog.mjs
@@ -0,0 +1,6 @@
+import { readFile } from 'fs/promises';
+
+const changelogContent = await readFile('./CHANGELOG.md', 'utf-8');
+const [, lastChangelog] = changelogContent.split(/^## .*$/gm);
+
+console.log(lastChangelog.trim());