Electron-builder: Global installer that get the latest release

Created on 9 Oct 2017  Â·  11Comments  Â·  Source: electron-userland/electron-builder

When I build a version, it generates a installer that get that specific version from this build, and only after install it will update to the latest.

I wondering if is possible to generate a nsis-web installer that get the latest version from Amazon S3, for example.

backlog nsis question

Most helpful comment

Adding my thoughts here. We need something this on more than nsis installers. For example, when the build process completes I want a versioned file AND a latest file... So, for example:

my-app-latest.dmg
my-app-latest.exe
my-app-1.2.9.dmg
my-app-1.2.9.zip
my-app-1.2.9.exe

This allows my users to always have the same download URL while still being able to revert to previous versions if necessary.

All 11 comments

Yes, it is possible.

You need to set appPackageUrl to some url (e.g. https://example.com/latest) and make sure that this url returns latest release installer.

get the latest version from Amazon S3, for example.

You need to manually upload latest installer as latest.exe. if you want some automation, please comment that it is required for you.

In Amazon S3, I need to specify the url like https://example.com/latest.yml or https://example.com/beta.yml ?

No. It is url to package file. (*-nsis.7z)

reopened — we need to support this case for S3 via declarative easy way.

For every new release build, I'll have to point to this new package ?
The problem is that my user will always have that old .exe file.

Yes, for every new release you have to upload corresponding 7z file as latest.7z (and, of course, https://www.electron.build/configuration/configuration#NsisWebOptions-appPackageUrl option should be set). So, when you will release new version, old installer will download this new package.

Adding my thoughts here. We need something this on more than nsis installers. For example, when the build process completes I want a versioned file AND a latest file... So, for example:

my-app-latest.dmg
my-app-latest.exe
my-app-1.2.9.dmg
my-app-1.2.9.zip
my-app-1.2.9.exe

This allows my users to always have the same download URL while still being able to revert to previous versions if necessary.

@codezomb were you able to achieve something similar?

@cyphercodes nope, sadly not.

I would like to take this approach since I am using Azure CDN replication for my packages. @develar Is there a way to set the name of the 7z files at the time of packaging?

ex. {appName}-{arch}.nsis.7z instead of the stand {appName}-{version}-{arch}.nsis.7z

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings