Skip to content

Conversation

vjanssens
Copy link
Contributor

Added a 'check for updates' button that links to the latest release page of Cumulus on GitHub.
Not the full auto-update feature issue #39 asks for, but it's a start which I think is useful.

image

@MichielDeMey
Copy link
Collaborator

I'd love to see an integration with the GitHub API as well, we can grab the latest release tag using:
https://api.github.com/repos/gillesdemey/cumulus/releases/latest
and compare that with the current application version (from the package.json).

That way we can show a nice dialog message in case the user is up-to-date.

@vjanssens
Copy link
Contributor Author

Thanks for pointing me in the right direction, my latest commit contains a call to the GitHub API and showing a dialog box, as seen below.

image

As you can see, I haven't been able to change the icon in the dialog because i'm not sure what image to use and the dialog does not display at all when I add icon: __dirname + '/app/IconTemplate.png' to mediaPlayer.js r.137. Maybe you could give it a try?

Another thing I'm not really happy about is mediaPlayer.js r.150. I would like to use the openExternal() method on the mediaPlayer class, but this is not bound to the mediaPlayer class anymore inside the promise. It works right now, so this would only be an improvement.

As for the version comparison, I've kept it as simple as possible. It just compares the tag from GitHub and the tag inside package.json and if they are equal, the app is up-to-date.

Can you let me know what you think? Thanks :)

var remote = window.require('remote')
var Menu = remote.require('menu')
var MenuItem = remote.require('menu-item')
var pjson = remote.require('./package.json')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: Nevermind, my bad. :)
👍

@vjanssens
Copy link
Contributor Author

No problem, if there is anything else please let me know 👍

var tag = response.tag_name.replace(/v/g, '')

if(pjson.version == tag) {
return Promise.resolve('Cumulus is currently up-to-date with the most recent version.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would shorten it to 'Cumulus is currently up-to-date.'.

@vjanssens
Copy link
Contributor Author

Sorry for the delay, I finally had some time to clean up the last bits today.
I've changed the strings as per your request and added the Cumulus icon. The 'update available' dialog has a 'Download latest version' button which leads to https://github.com/gillesdemey/Cumulus/releases/latest.

cumuls-download-latest-version

@gillesdemey
Copy link
Owner

LGTM! 👍

@gillesdemey gillesdemey merged commit d9cab3b into gillesdemey:master Apr 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants