Skip to content

Commit

Permalink
fix: generate correct release note from pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Apr 15, 2024
1 parent 30c2599 commit 6b19ace
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions patches/changelogithub@0.13.6.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/index.cjs b/dist/index.cjs
index 58583c81c7d53430a0fa0ec4272835d0612a9e0e..2e48fab2b266ba079d71931efc92316c00ef9339 100644
index 58583c81c7d53430a0fa0ec4272835d0612a9e0e..fe0e2098ae9c433dbdf8da1669ec78e01c0198e7 100644
--- a/dist/index.cjs
+++ b/dist/index.cjs
@@ -139,13 +139,13 @@ async function getGitTags() {
Expand All @@ -14,13 +14,13 @@ index 58583c81c7d53430a0fa0ec4272835d0612a9e0e..2e48fab2b266ba079d71931efc92316c
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(tag2[0] === "v" ? tag2.slice(1) : tag2) && semver__default.prerelease(tag2) === null);
+ tag = tags.find((tag2) => tag2 !== inputTag && semver__default.valid(tag2[0] === "v" ? tag2.slice(1) : tag2) && semver__default.prerelease(tag2[0] === "v" ? tag2.slice(1) : tag2) === null);
+ tag || (tag = tags.find((tag2) => tag2 !== inputTag && semver__default.valid(tag2[0] === "v" ? tag2.slice(1) : tag2)));
return tag;
}
async function isRefGitTag(to) {
diff --git a/dist/index.mjs b/dist/index.mjs
index 2aa6747fdfa40e0980f7cfc9480c99536e7c636b..c3b5ba8a998433ac3d7a0f7c345e276c3441af45 100644
index 2aa6747fdfa40e0980f7cfc9480c99536e7c636b..9ed7dbb0c07100e945b5b7d4677fae5d83aad4f1 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -133,13 +133,13 @@ async function getGitTags() {
Expand All @@ -35,7 +35,7 @@ index 2aa6747fdfa40e0980f7cfc9480c99536e7c636b..c3b5ba8a998433ac3d7a0f7c345e276c
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(tag2[0] === "v" ? tag2.slice(1) : tag2) && semver.prerelease(tag2) === null);
+ tag = tags.find((tag2) => tag2 !== inputTag && semver.valid(tag2[0] === "v" ? tag2.slice(1) : tag2) && semver.prerelease(tag2[0] === "v" ? tag2.slice(1) : tag2) === null);
+ tag || (tag = tags.find((tag2) => tag2 !== inputTag && semver.valid(tag2[0] === "v" ? tag2.slice(1) : tag2)));
return tag;
}
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b19ace

Please sign in to comment.