feat: canary support

This commit is contained in:
xHyroM 2022-07-25 22:31:43 +02:00
parent a0f9c413e5
commit 37397a08ec
4 changed files with 5 additions and 7 deletions

View file

@ -5,7 +5,7 @@ export default async (version, token, miscTestBuilds) => {
if (version === 'latest' || miscTestBuilds)
url = `https://api.github.com/repos/${repository}/releases/latest`;
else
url = `https://api.github.com/repos/${repository}/releases/tags/bun-v${version}`;
url = `https://api.github.com/repos/${repository}/releases/tags/${version.includes('canary') ? version : `bun-v${version}`}`;
const release = await (await fetch(url, {
headers: {
'Content-Type': 'application/json',