Jump to content

Alfred Workflow Updater (Swift)


Recommended Posts

library in Swift to ease the integration of updates from within Alfred.

 

the API is basically four (3+1, or 2+2 if you prefer) methods:

 

1. check if an update is available (compares latest version on GitHub release VS the version of your local Workflow):

 

if let release = Updater.checkUpdate(for: "godbout/AlfredKat") {
    // release.version, release.file, release.page available
}

 

2. launch the update 

 

Updater.update(with: release.file)

 

3. notify (useful before launching at it is blocking)

 

Updater.notify(title: "Alfred Kat", message: "downloading your s... workflow")

 

4. open release page (or anything for that matter)

 

Updater.open(page: release.page)

 

 

more on GitHub: https://github.com/godbout/AlfredWorkflowUpdater

 

currently the update will be blocking your Script and the notification icon is the Script Editor one. this should get better in subsequent updates.

 

enjoy ☀️

 

 

Edited by godbout
Link to comment
  • 9 months later...
  • 6 months later...

i am proud to announce the new Alfred Workflow Updater!

 

here: https://github.com/godbout/AlfredWorkflowUpdater

 

it's now version 2.0.0. it's so good i just skipped version 1. it solves two problems with the previous version: 1) background checks 2) using your own Alfred Workflow icon for the notifications.

 

now it's even simpler. download the Command Line Tool, add it to your workflow. and follow the few instructions (https://github.com/godbout/AlfredWorkflowUpdater#api). you'll be set up in under a minute.

 

enjoy.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...