I'm struggling to understand how the documentation works.
I'm trying to set up the autoupdate configuration for a generic url path. I have no idea what the name of the field is and where it goes, not what channel
is.
https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#genericserveroptions--publishconfiguration
You would normally just add a publish
property to your build
section in the package.json
If you wanted to use different publish configurations for different platforms, then you would move the publish
property to the specific platform build section.
So if you just wanted to add a generic url path to the config you would just edit your package.json
and somewhere in the build section you would have the following:
{
...,
"build": {
...,
"publish": {
"provider": "generic",
"url": "https://your.generic.url"
},
...
},
...
}
The channel
field is optional, and is something you would use if you wanted to differentiate between the alpha, beta, and general builds for your app.
Hope this helps
@mzmiric5 馃憤
@ccorcos https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#publish-options
@mzmiric5, @develar
So if I want to have a dynamic url according to build env like:
production to:
https://www.something.com/update
and master to:
https://www.something.com/update-beta
Than I cant use a dynamic url meaning override url in the cli script or have 2 sets of publish mac configuration? I will have to use the channel
option?
Most helpful comment
You would normally just add a
publish
property to yourbuild
section in thepackage.json
If you wanted to use different publish configurations for different platforms, then you would move the
publish
property to the specific platform build section.So if you just wanted to add a generic url path to the config you would just edit your
package.json
and somewhere in the build section you would have the following:The
channel
field is optional, and is something you would use if you wanted to differentiate between the alpha, beta, and general builds for your app.Hope this helps