Canary fallback to latest to avoid issues
This commit is contained in:
1 parent
74742c7e28
commit
6e0ee8adf4
1 file changed
+8
@@ -138,6 +138,14 @@ export class PlayletApi {
|
|||||||
link: `https://github.com/iBicha/playlet/releases/download/${tag}/playlet-lib.zip`,
|
link: `https://github.com/iBicha/playlet/releases/download/${tag}/playlet-lib.zip`,
|
||||||
type: 'custom'
|
type: 'custom'
|
||||||
}]
|
}]
|
||||||
|
// When an official release is out, it replaces the current canary release.
|
||||||
|
// To avoid the "not found" error, we fallback to the default "latest" release.
|
||||||
|
if (tag === "canary") {
|
||||||
|
urls.push({
|
||||||
|
link: `https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip`,
|
||||||
|
type: 'custom'
|
||||||
|
})
|
||||||
|
}
|
||||||
await PlayletApi.postJson(`${PlayletApi.host()}/api/playlet-lib-urls`, urls);
|
await PlayletApi.postJson(`${PlayletApi.host()}/api/playlet-lib-urls`, urls);
|
||||||
} else {
|
} else {
|
||||||
return await fetch(`${PlayletApi.host()}/api/playlet-lib-urls`, { method: "DELETE" });
|
return await fetch(`${PlayletApi.host()}/api/playlet-lib-urls`, { method: "DELETE" });
|
||||||
|
|||||||
Reference in new issue
Block a user