generated from hyoban/starter-ts
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: patch changelogithub to find correct tag
- Loading branch information
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/dist/index.cjs b/dist/index.cjs | ||
index 58583c81c7d53430a0fa0ec4272835d0612a9e0e..af680a98143fcb32435650df652c5e954395210b 100644 | ||
--- a/dist/index.cjs | ||
+++ b/dist/index.cjs | ||
@@ -144,8 +144,8 @@ async function getLastMatchingTag(inputTag) { | ||
const tags = await getGitTags(); | ||
let tag; | ||
if (!isPrerelease2 && isVersion) | ||
- tag = tags.find((tag2) => tag2 !== inputTag && tag2[0] === "v" && !tag2.includes("-")); | ||
- tag || (tag = tags.find((tag2) => tag2 !== inputTag)); | ||
+ tag = tags.find((tag2) => tag2 !== inputTag && semver__default.valid(semver__default.coerce(tag)) && semver__default.prerelease(tag) === null); | ||
+ tag || (tag = tags.find((tag2) => tag2 !== inputTag && semver__default.valid(semver__default.coerce(tag)))); | ||
return tag; | ||
} | ||
async function isRefGitTag(to) { | ||
diff --git a/dist/index.mjs b/dist/index.mjs | ||
index 2aa6747fdfa40e0980f7cfc9480c99536e7c636b..d7587dbcbdeefb608a82b637f36adfd8feff7b68 100644 | ||
--- a/dist/index.mjs | ||
+++ b/dist/index.mjs | ||
@@ -138,8 +138,8 @@ async function getLastMatchingTag(inputTag) { | ||
const tags = await getGitTags(); | ||
let tag; | ||
if (!isPrerelease2 && isVersion) | ||
- tag = tags.find((tag2) => tag2 !== inputTag && tag2[0] === "v" && !tag2.includes("-")); | ||
- tag || (tag = tags.find((tag2) => tag2 !== inputTag)); | ||
+ tag = tags.find((tag2) => tag2 !== inputTag && semver.valid(semver.coerce(tag)) && semver.prerelease(tag) === null); | ||
+ tag || (tag = tags.find((tag2) => tag2 !== inputTag && semver.valid(semver.coerce(tag)))); | ||
return tag; | ||
} | ||
async function isRefGitTag(to) { |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.