Skip to content

Commit

Permalink
updating roll-changelog script
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock committed Feb 21, 2024
1 parent 15c37a5 commit 33cbd60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions bin/roll-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ if (!newVersion) {
console.error('Please provide a new version as an argument.');
process.exit(1);
}
const now = new Date();
const formattedDate = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;

const path: string = 'docs/CHANGELOG.md';
const pattern: string = 'Version x.x.x';
const replacement: string = `Version x.x.x
-------------
const pattern: string = '## [Unreleased]';
const replacement: string = `## [Unreleased]
Version ${newVersion}`;
## [${newVersion}] - ${formattedDate}`;

readFile(path, 'utf8', (err, data) => {
if (err) throw err;
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* feat: adds `fromPem` method for `identity-secp256k1`

## [1.0.1] - 2022-02-20
## [1.0.1] - 2024-02-20

### Changed

Expand Down

0 comments on commit 33cbd60

Please sign in to comment.