Skip to content

Commit

Permalink
fix: make this work for tags that contain a name/prefix before the ve…
Browse files Browse the repository at this point in the history
…rsion no
  • Loading branch information
restfulhead committed Feb 23, 2024
1 parent 921976d commit 6378457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ export default class Release {
/** Given a tag get the next incremented version */
async calcNextVersion(lastTag: string) {
const bump = await this.getSemverBump(lastTag);
return inc(lastTag, bump as ReleaseType);
const matches = lastTag.match(/(\d+\.\d+\.\d+)/)
const lastVersion = matches ? matches[0] : lastTag
return inc(lastVersion, bump as ReleaseType);
}

/** Create the class that will parse the log for PR info */
Expand Down

0 comments on commit 6378457

Please sign in to comment.