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 that the installed version of my Service is old. One way might be to give it a "version".
I have tried many ways, none of which worked. In particular, usually there is a CFShortVersionString key in an app's info.plist file. I can add that to my Service's info.plist file. But, when I open my Service in Automator.app, make some changes and then save, all my custom entries in the info.plist file are deleted.
Is there an editor for Automator workflows that does not remove custom keys in the info.plist file ?
Thanks.
UDATE: Adding a variable to the workflow is a good idea. But, I can't it working for me. Yesterday, I added the variable called "Version" and gave it a value "1.21". Today, the variable is still there but is empty. Probably because I still do not understand how it all works and I made a mess of it.
In the end, a separate file in the service's bundle containing just the version string is easy for me as my AppleScript applet can read it without having to parse a complicated XML file (either as plain text or using System Events).
Also, I still don't know how developers create workflows which DO contain version and other keys inside the info.plist file. Automator removes those keys and so developers must be using another tool – Xcode ?
Have also found some services that contain a "version.plist" file. I have Googled for hours but, can find no documentation on the "version.plist" file content – which seems to duplicate some keys inside info.plist. The "version.plist" file does not seem to be used by Finder. In an example service provided by Apple, if I delete the CFBundleShortVersionString from the info.plist file, but retain the version.plist file, Finder's Get Info shows no version.
UPDATE 2: Apparently version.plist is used by Installer. More detail here: http://mirror.informatimago.com/next/developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_pkg_version_info.html
Can't find that detail anywhere on developer.apple.com so, it might be out-of-date/wrong.