timche / gmail-desktop

:postbox: Nifty Gmail desktop app for macOS, Linux & Windows
MIT License
832 stars 91 forks source link

Check for Updates button throws an error on unsupported platforms #317

Open DinCahill opened 2 years ago

DinCahill commented 2 years ago

OS Linux (non-AppImage) Development builds (any OS)

Gmail Desktop Version v3.0.0-alpha.34

Describe the bug When using the deb package, the "Check for Updates" button throws an error because app-update.yml does not exist.

When developing via npm run start, it's dev-app-update.yml instead.

Steps to reproduce the behavior

  1. Click the top-left menu > Gmail Desktop > Check for Updates...
  2. Error message appears

Expected behavior The option should not be shown, or should not throw an error.

Media electron-updater error 20220221-172616_electron

Additional context This presumably affects anything not supported by electron-updater: deb, rpm, Arch etc.

I tried simply checking if path.join(app.getAppPath(), '..', 'app-update.yml') exists, and that worked as expected on Windows, Mac, Linux AppImage, and Linux deb.


For testing electron-updater in development, the documentation says this:

Note that in order to develop/test UI/UX of updating without packaging the application you need to have a file named dev-app-update.yml in the root of your project, which matches your publish setting from electron-builder config (but in yaml format). But it is not recommended, better to test auto-update for installed application (especially on Windows). Minio is recommended as a local server for testing updates.

Example dev-app-update.yml for GitHub:

provider: github
owner: timche
repo: gmail-desktop
channel: dev