Jump to content
vitor

OneUpdater — Update workflows with a single node

Recommended Posts

Hi @vitor is there a difference between setting "download_type" to "github_release" and setting the download type to direct and in the workflow_url setting the url to the latest release for example "https://github.com/user/repo/releases/latest/download/weorkflowname.alfredworkflow"?

 

Also after implementing the updater I did a test and it notified me about and update (it downloaded the workflow from GitHub correctly and asked me to update, everything good here) except that there was no update, the thing is that I forgot to push the updated "info.plist" to GitHub (the one in GitHub said 1.0.0) while my workflow was in version 1.0.4, so it appears that the updater only does a simple comparison  like $v1 !== $v2 instead of actually checking if the release version is bigger than the current version.

 

So my question is do you think this could cause an issue (not now and not in my case) in the future with any workflow where the author forgets to change the version or something happens? or am I just dumb for making such mistake?

 

Anyways, I think this is awesome, it's really simple to implement and it could basically be implemented in any workflow. As a new Alfred user I spent a few weeks looking and testing workflows you can find 3 or 4 different versions of the same workflow, outdated information, outdated links, etc. and it appears that there's not a single source where everyone could look for workflows (apart from the forum and I'm not sure this is the best way) I hope OneUpdater could become the standard for handling updates. Thank you for sharing.

Share this post


Link to post
On 11/16/2019 at 8:02 PM, biati said:

Hi @vitor is there a difference between setting "download_type" to "github_release" and setting the download type to direct and in the workflow_url setting the url to the latest release for example "https://github.com/user/repo/releases/latest/download/weorkflowname.alfredworkflow"?

 

It should work the same, with the exception that with github_release you don’t need the Workflow’s name to not change.

 

On 11/16/2019 at 8:02 PM, biati said:

so it appears that the updater only does a simple comparison  like $v1 !== $v2 instead of actually checking if the release version is bigger than the current version.

 

Yes, that’s correct. As a long-time maintainer of Homebrew Cask, I’ll say that trying to figure out every versioning method from everyone to understand when a release is higher or lower is a waste of time and resources. For an auto-updater you want the latest version, and that’s the one on the source.

 

On 11/16/2019 at 8:02 PM, biati said:

the thing is that I forgot to push the updated "info.plist" to GitHub (the one in GitHub said 1.0.0) while my workflow was in version 1.0.4

 

Another case where the simplistic comparison is useful.

 

On 11/16/2019 at 8:02 PM, biati said:

So my question is do you think this could cause an issue (not now and not in my case) in the future with any workflow where the author forgets to change the version

 

If an author forgets to change the version, the only thing that will happen is that users won’t get the update (same as other updaters).

 

On 11/16/2019 at 8:02 PM, biati said:

or something happens?

 

Like what?

 

On 11/16/2019 at 8:02 PM, biati said:

Anyways, I think this is awesome

 

Thank you!

 

On 11/16/2019 at 8:02 PM, biati said:

it's really simple to implement and it could basically be implemented in any workflow.

 

Those are its design goals, so happy to see it succeeds.

 

On 11/16/2019 at 8:02 PM, biati said:

I hope OneUpdater could become the standard for handling updates.

 

Thank you again. Some libraries, like @deanishe’s Alfred-Workflow (for python), have builtin-updaters, so if you’re using the library for everything else, it makes sense to use its updater.

Edited by vitor

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...