Jump to content

How to release the next version of my workflow to share with other Alfred users? (Mechanism explanation required)


Recommended Posts

I’m a newbie to both Alfred development and GitHub version control. 

 

I built a new Alfred workflow called Sequential Strings Creator published on Github. 

 

I read some documents such as "Exporting and Sharing Workflows” but still confuse about the mechanism of shared release. 

 

That is, how should I release the next version so that other Alfred users can get it via the bundle ID?

 

I plan to release the next version by the following steps:

 

  1. Clone the repo from Github remote to local
  2. Modify the files and fix the bugs
  3. Push the new repo back to the GitHub 
  4. Release a new version by GitHub with the corresponding alfredworkflow file

 

Is it true that by these procedures, this new version would be received by other Alfred users who use this workflow? Otherwise, what else should I do?

 

Also, is there any method to check whether the release is successfully received by others?

Edited by yli
change link
Link to comment

@deanishe Thank you for your reply. I looked through your link and several repos in your GitHub and finally published it on GitHub.

 

Could you please help me to check the self-update part in the main python file? Whether I write it correctly?  It’s a very short code so won’t waste you lots of time.

 

I also hope to confirm two things:

 

1. If I get it right from your link, I don’t need to type `__version__ = 'x.x.x'` and `’version': __version__` in my source code if I assign the version number every time I export the alfredworkflow file (showed as below), which also modify the plist file. In this case, should I keep the version number in my source code?

 

image.thumb.png.b33dbc36cc9fee3a30326562594beb70.png

 

2. Is it true that up to know, the next time when I release a new version in this Github repo, my users will get the update automatically?

 

Thank you so much! 

 

 

Edited by yli
change link
Link to comment
8 minutes ago, yli said:

I don’t need to type `__version__ = 'x.x.x'` and `’version': __version__` in my source code if I assign the version number every time I export the alfredworkflow file (showed as below)

 

That is correct. You should set the version in Alfred Preferences, not in code (the library is old, and Alfred didn't have that feature when it was written).

 

9 minutes ago, yli said:

Could you please help me to check the self-update part in the main python file?

 

It will work, but I wouldn’t do it that way. I think it’s better to show the user that an update is available and let them trigger the update. If the workflow automatically triggers the update, it's not clear to the user what's happening.

 

12 minutes ago, yli said:

Is it true that up to know, the next time when I release a new version in this Github repo, my users will get the update automatically?

 

Anyone that has a version of the workflow with the updater active will get new versions automatically.

 

Link to comment
1 hour ago, deanishe said:

It will work, but I wouldn’t do it that way. I think it’s better to show the user that an update is available and let them trigger the update. If the workflow automatically triggers the update, it's not clear to the user what's happening.

 

Good idea. I update it as showed below! 

 

Probably the last two questions:

 

1. Should I add “valid = False” here? It’s not the case from your link but from your repo.

 

2. Should I put the update module in the position of 1 or 2? Or both are fine? Because the example given in your link and repo is a bit different.

 

 

image.thumb.png.321166f9412090fa7abffcaed7368ef9.png

Link to comment
47 minutes ago, yli said:

Should I add “valid = False” here? It’s not the case from your link but from your repo.

 

Shouldn't be necessary: it defaults to False, IIRC.

 

49 minutes ago, yli said:

Because the example given in your link and repo is a bit different.

 

The example in the docs is just a context-free example, not real, working code.

 

I wouldn’t recommend putting the code in the if __name__ == '__main__' clause. It can raise an exception, so it should be wrapped by wf.run(), and it logically belongs with the other item-generation code, not the "execute if this is the main script" code.

 

 

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...