()
| 697 | } |
| 698 | |
| 699 | async function processChangelog() { |
| 700 | const file = 'CHANGELOG.md' |
| 701 | let changelog = fs.readFileSync(file).toString() |
| 702 | |
| 703 | // user |
| 704 | changelog = changelog.replace(/\s@([\w-]+)/gm, ' **[$1](https://github.com/$1)**') |
| 705 | |
| 706 | // issue |
| 707 | changelog = changelog.replace(/#(\d+)/gm, '[#$1](https://github.com/codeceptjs/CodeceptJS/issues/$1)') |
| 708 | |
| 709 | // helper |
| 710 | changelog = changelog.replace(/\s\[(\w+)\]\s/gm, ' **[$1]** ') |
| 711 | |
| 712 | writeToFile('docs/changelog.md', cfg => { |
| 713 | cfg.line('---') |
| 714 | cfg.line('permalink: /changelog') |
| 715 | cfg.line('title: Releases') |
| 716 | cfg.line('sidebar: false') |
| 717 | cfg.line('layout: Section') |
| 718 | cfg.line('---') |
| 719 | cfg.line('') |
| 720 | cfg.line('# Releases') |
| 721 | cfg.line('') |
| 722 | cfg.line(changelog) |
| 723 | }) |
| 724 | } |
| 725 | |
| 726 | if (require.main === module) runok(module.exports) |
no test coverage detected