Comments (9)
Puh, this already sounds pretty advanced for a helper framework.
I don't think that there's a need for a migration system. I can't think of a scenario where I would really need to know about this.
Besides, I think its a good idea to clear the cache folder after upgrade by default. I haven't tested it yet, but aren't cache and settings deleted automatically after replacing a workflow with a new version?
Keeping settings might be useful but certainly raises the problem of incompatible versions.
from alfred-workflow.
Certainly the data directory isn't cleared after an update. I think that would be bad form: all your settings gone.
Let's forget about the framework, but I do think the first_run
boolean and last_version_run
property would be useful: in most cases you wouldn't care if it's the first time v2.1.1 has run if the last version to run was v2.1.0, but you might if it was v1.7, as you may need to clear the caches and/or update the data.
from alfred-workflow.
Alfred-Workflow could easily clear the caches right before an update is initiated. Developers would have to check their settings in their scripts if they have made changes. Providing a simple first_run()
method would make it easier, but that's as far as it should go, right?
from alfred-workflow.
It'd probably make more sense to have a last_version_run
method/property. That'd give you a better idea of whether or not any update may be necessary:
>>> first_run = wf.first_run()
True
# what now?
>>> v = wf.last_version_run()
Version(1.7)
>>> if v < Version('2.0'):
migrate_v1_to_v2()
from alfred-workflow.
Sounds about right! :)
from alfred-workflow.
Of course, it's dependent on some implementation of semantic versioning/version string parsing.
from alfred-workflow.
True, I thought we already have agreed on semantic versioning for version 2? ;)
from alfred-workflow.
We had. We have. It will be semantic, but won't implement the full standard because that's rather complex.
from alfred-workflow.
Added in v1.10.1.
from alfred-workflow.
Related Issues (20)
- Cache Image HOT 5
- Basic auth HOT 3
- Pass parameter to subprocess HOT 5
- Tutorial options for keywords need to be updated for Alfred 4 HOT 11
- set_config raises error when the bundle id is null HOT 4
- Setting only arg on Variables adds line break HOT 1
- will it support python3? HOT 1
- python3 has no cpickle HOT 1
- cant get output HOT 11
- chr() arg not in range(256) error when trying to use Beautiful Soup 4 HOT 1
- workflow:magic not working?
- API functionality question
- AlertCautionIcon.icns does not exist on Big Sur
- ERROR: [Script Filter] JSON error
- Google SDK
- Can't get Script Filter to find the pinboard.py file from the tutorial HOT 1
- [Feature request] Possible to open bookmarks from root?
- Not working on the latest MacOS 12.3 HOT 11
- How to fetch chrome cookie?
- Issues with notify.notify in release version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-workflow.