Git Product home page Git Product logo

Comments (3)

kamranahmedse avatar kamranahmedse commented on July 3, 2024 1

Sure, go ahead :)

from pennywise.

HyunmoAhn avatar HyunmoAhn commented on July 3, 2024

I know simple solution that implement update for builded app.

I will describe logic and code of simple solution.
If you like this, I want to make PR about this issue.

Using electron-updater, show documentation if you want

Sequence

This method keeps your built applications up to date at all times.

  1. When started application, app check if current version is latest version.
  2. If current version is not latest, app install latest version without asking user.
  3. App notify that complete of download about latest install file.
  4. When app is quited, app is updated latest version using install file.

Precondition

  • Need to uploaded builded file(like pennywise-0.6.0.dmg) in github release page
    • It doesn't matter because this is already being done.
  • This method use GitHub API. Therefore It exist limit for update check per hour. I think this limit is big enough for update but If you want huge service, this method may not be suitable for use.

The GitHub API currently has a rate limit of 5000 requests per user per hour. An update check uses up to 3 requests per check.

Code

Show my repository code
I made update for electron app.

  1. import electron-updater.
import { autoUpdater } from 'electron-updater';
  1. setting github repository config.
autoUpdater.setFeedURL({
  provider: 'github',
  owner: '{user-name}',
  protocol: 'https',
  repo: '{repo-name}',
});
  1. call update check method (may be located when app is inited)
autoUpdater.checkForUpdatesAndNotify()

Screen shot about notification.

image

Please comment your opinion.
If you like this method, I can make PR.

from pennywise.

HyunmoAhn avatar HyunmoAhn commented on July 3, 2024

Close this issue because of completed by #68

from pennywise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.