fix
This commit is contained in:
parent
d7a3f63403
commit
8d35475b17
@ -97,6 +97,7 @@ async function getSemverDownloadMeta(options: Input): Promise<DownloadMeta> {
|
|||||||
: {},
|
: {},
|
||||||
})
|
})
|
||||||
).json()) as { ref: string }[];
|
).json()) as { ref: string }[];
|
||||||
|
|
||||||
let tags = res
|
let tags = res
|
||||||
.filter(
|
.filter(
|
||||||
(tag) =>
|
(tag) =>
|
||||||
@ -104,14 +105,18 @@ async function getSemverDownloadMeta(options: Input): Promise<DownloadMeta> {
|
|||||||
)
|
)
|
||||||
.map((item) => item.ref.replace(/refs\/tags\/(bun-v)?/g, ""));
|
.map((item) => item.ref.replace(/refs\/tags\/(bun-v)?/g, ""));
|
||||||
|
|
||||||
|
console.log(tags);
|
||||||
|
|
||||||
const { version, os, arch, avx2, profile } = options;
|
const { version, os, arch, avx2, profile } = options;
|
||||||
|
|
||||||
let tag = tags.find((t) => t === version);
|
let tag = tags.find((t) => t === version);
|
||||||
|
console.log(tag);
|
||||||
if (!tag) {
|
if (!tag) {
|
||||||
tags = tags.filter((t) => validate(t)).sort(compareVersions);
|
tags = tags.filter((t) => validate(t)).sort(compareVersions);
|
||||||
|
console.log(tags);
|
||||||
|
|
||||||
const matchedTag =
|
const matchedTag =
|
||||||
version === "latest"
|
version === "latest" || !version
|
||||||
? tags.at(-1)
|
? tags.at(-1)
|
||||||
: tags.filter((t) => satisfies(t, version)).at(-1);
|
: tags.filter((t) => satisfies(t, version)).at(-1);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user