GitHub releases
This commit is contained in:
parent
4606f506f2
commit
87eb8e6d59
1 changed files with 3 additions and 13 deletions
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue