Skip to content

Commit

Permalink
fix: change version style for support changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Aug 23, 2020
1 parent 975b4b1 commit a4b8216
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/update-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ const prefix = [
date.getFullYear(),
(date.getMonth() + 1).toString().padStart(2, '0'),
date.getDate().toString().padStart(2, '0'),
'',
].join('.');
].join('.') + '-';

let idx = 0;

if (pkg.version.startsWith(prefix))
{
idx = +(pkg.version.match(/\.(\d+)$/)[1]) + 1
idx = +(pkg.version.match(/\-(\d+)$/)[1]) + 1
}

const version = prefix + idx;
Expand Down

0 comments on commit a4b8216

Please sign in to comment.