Skip to content

Commit

Permalink
Fix update-comment script to ignore invalid tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Apr 26, 2022
1 parent 85627ff commit 848fef5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/release/update-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const { version } = require('../../package.json');
// Get latest tag according to semver.
const [ tag ] = run('git', 'tag')
.split(/\r?\n/)
.filter(semver.coerce) // check version can be processed
.filter(v => semver.lt(semver.coerce(v), version)) // only consider older tags, ignore current prereleases
.sort(semver.rcompare);

Expand Down

0 comments on commit 848fef5

Please sign in to comment.