fix
This commit is contained in:
parent
38b69c3ba1
commit
850fadebcc
@ -105,15 +105,11 @@ 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
|
version === "latest" || !version
|
||||||
@ -132,8 +128,8 @@ async function getSemverDownloadMeta(options: Input): Promise<DownloadMeta> {
|
|||||||
const eversion = encodeURIComponent(tag ?? version);
|
const eversion = encodeURIComponent(tag ?? version);
|
||||||
const eos = encodeURIComponent(os ?? getPlatform());
|
const eos = encodeURIComponent(os ?? getPlatform());
|
||||||
const earch = encodeURIComponent(arch ?? getArchitecture());
|
const earch = encodeURIComponent(arch ?? getArchitecture());
|
||||||
const eavx2 = encodeURIComponent(avx2 ? "" : "-baseline");
|
const eavx2 = encodeURIComponent(avx2 == true ? "-baseline" : "");
|
||||||
const eprofile = encodeURIComponent(profile ? "-profile" : "");
|
const eprofile = encodeURIComponent(profile == true ? "-profile" : "");
|
||||||
|
|
||||||
const { href } = new URL(
|
const { href } = new URL(
|
||||||
`${eversion}/bun-${eos}-${earch}${eavx2}${eprofile}.zip`,
|
`${eversion}/bun-${eos}-${earch}${eavx2}${eprofile}.zip`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user