Skip to content

Commit

Permalink
fix: bump-up of pre-version
Browse files Browse the repository at this point in the history
Currently when we try to release a new pre-version we receive the error `An error occurred while running semantic-release: TypeError: Invalid Version: <PACKAGE NAME>@<VERSION>`.
  • Loading branch information
KillianHmyd authored and antongolub committed Jan 22, 2021
1 parent 0461a81 commit 02ef270
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/updateDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const getNextPreVersion = (pkg, tags) => {
// 2. Get tags from a branch considering the filters established
// TODO: replace {cwd: '.'} with multiContext.cwd
if (pkg.name) tagFilters.push(pkg.name);
if (!tags || !tags.length) tags = getTags(pkg._branch, { cwd: "." }, tagFilters);
if (!tags || !tags.length) {
tags = getTags(pkg._branch, { cwd: "." }, tagFilters)
.map(tag => pkg.name ? tag.replace(`${pkg.name}@`, '') : tag);
}

const lastPreRelTag = getPreReleaseTag(lastVersion);
const isNewPreRelTag = lastPreRelTag && lastPreRelTag !== pkg._preRelease;
Expand Down

0 comments on commit 02ef270

Please sign in to comment.