GitHub releases

This commit is contained in:
Core 2022-03-17 16:18:20 +00:00
parent 4606f506f2
commit 87eb8e6d59
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -134,21 +134,11 @@ export class utils {
bw.win.webContents.send('update-response', "update-error")
return;
}
// Get the artifacts
const response = await fetch(`https://circleci.com/api/v1.1/project/gh/ciderapp/Cider/latest/artifacts?branch=${utils.getStoreValue('general.update_branch')}&filter=successful`)
if (response.status != 200) {
bw.win.webContents.send('update-response', 'update-timeout')
return;
}
// Get the urls
const jsonResponse = await response.json()
let base_url = jsonResponse[0].url
base_url = base_url.substring(0, base_url.lastIndexOf('/'))
const options: any = {
provider: 'generic',
url: base_url,
provider: 'github',
protocol: 'https',
releaseType: utils.getStoreValue('general.update_branch') === "develop" ? "prerelease" : "release",
allowDowngrade: true,
}