Skip to content

Commit

Permalink
match latest tag regex (#171)
Browse files Browse the repository at this point in the history
* match latest tag regex

* Lint fixes
  • Loading branch information
sauramirez committed Mar 11, 2024
1 parent 1bf7977 commit f40d7ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export function getLatestTag(
tagPrefix: string
) {
return (
tags.find((tag) => !prerelease(tag.name.replace(prefixRegex, ''))) || {
tags.find(
(tag) =>
prefixRegex.test(tag.name) &&
!prerelease(tag.name.replace(prefixRegex, ''))
) || {
name: `${tagPrefix}0.0.0`,
commit: {
sha: 'HEAD',
Expand Down

0 comments on commit f40d7ee

Please sign in to comment.