it-tools/scripts/getLatestChangelog.mjs
2023-04-14 21:08:43 +02:00

7 lines
208 B
JavaScript

import { readFile } from 'fs/promises';
const changelogContent = await readFile('./CHANGELOG.md', 'utf-8');
const [, lastChangelog] = changelogContent.split(/^## .*$/gm);
console.log(lastChangelog.trim());