I have a workflow which is installed as a Service. It is used to call code in my AppleScript applet. The Service has one action: a "Run AppleScript" action. I update the Service quite often with improvements.
I need a way to know whether my users' copy of the Service is out-of-date. I have developed some ideas:
- First is to compare file size of user's copy against the copy being distributed. If they are different, then, the user's copy is out-of-date and needs to be updated. That works except that users need to be able to retain changes to their copy of the Service which should not be over-written my by applet.
- Second is to make a custom property in the workflow's info.plist file. That, however, is over-written by Automator when it saves the workflow.
- Third is to add a comment to the AppleScript code inside the workflow which can be interrogated by my applet. That does work but, opening and reading the workflow file seems like over-kill and runs the risk of that file being over-written or the XML code being corrupted.
- Fourth is to add a plain text file to the contents of the workflow which would contain the version detail. My applet could then interrogate that file to get the version and this know whether the user's copy is out-of-date.
I'm inclined to using the 4th idea. However, all of those ideas are kludges.
Is there an Apple sanctioned method of versioning an Automator service workflow ?
Thanks.