| 594 | } |
| 595 | |
| 596 | async function processChangelog() { |
| 597 | const file = 'CHANGELOG.md' |
| 598 | let changelog = fs.readFileSync(file).toString() |
| 599 | |
| 600 | changelog = changelog.replace(/\s@([\w-]+)/gm, ' **[$1](https://github.com/$1)**') |
| 601 | changelog = changelog.replace(/#(\d+)/gm, '[#$1](https://github.com/codeceptjs/CodeceptJS/issues/$1)') |
| 602 | changelog = changelog.replace(/\s\[(\w+)\]\s/gm, ' **[$1]** ') |
| 603 | |
| 604 | await writeToFile('docs/changelog.md', line => { |
| 605 | line`---` |
| 606 | line`permalink: /changelog` |
| 607 | line`title: Releases` |
| 608 | line`sidebar: false` |
| 609 | line`layout: Section` |
| 610 | line`---` |
| 611 | line`` |
| 612 | line`# Releases` |
| 613 | line`` |
| 614 | line`${changelog}` |
| 615 | }) |
| 616 | } |
| 617 | |
| 618 | /** |
| 619 | * Run the read-only REST test server on port 8010. |