ArekSredzki / electron-release-server

A fully featured, self-hosted release server for electron applications, compatible with auto-updater.
MIT License
2.06k stars 546 forks source link

Does this package works with `electron-updater` package? #363

Open alisherafat01 opened 3 months ago

alisherafat01 commented 3 months ago

I want to know which package to use:

import { autoUpdater } from 'electron-updater';
or 
import {  autoUpdater } from 'electron';
lilhuy0405 commented 4 weeks ago

Yes it does you can import it like this import {autoUpdater} from 'electron'; And follow this docs: https://www.electronjs.org/docs/latest/tutorial/updates#using-other-update-services But if you follow this docs there is a note: the platform's name saved in electron-release-server and the process.platform is difference. So this code from docs will build a wrong update url

const server = 'https://your-deployment-url.com'
const url = `${server}/update/${process.platform}/${app.getVersion()}`

autoUpdater.setFeedURL({ url })

In my case proccess.platfrom is win64 but the platform that release server expected is something looks like windows_64 so we need to format the platform to match the release server