[Tutor] How to deploy seamless script updates to your "clients"?
mats at wichmann.us
Sun May 28 15:58:52 EDT 2017
On 05/27/2017 05:33 AM, M Hashmi wrote:
> That's where Git or other version control systems come in. You can edit or
> upgrade creating a branch and when a branch tested at your side. You can
> push it with new tag like "some module changed". I guess this is how it
> works for everyone. All your team will get replicated code once you merge
> branch. Its simple and its reliable.....all your resource only may need to
> work around a dozen shell commands.
Letting git (or mercurial, or some other version control system) handle
this is a nice approach. It doesn't have to be a public server, it can
of course be an inside-company git server. Endorsed.
I did end up curious how hard it would be to write the check code, so
after a little hunting around I put together a simple one (might become
the source for a blog entry someday, or not). The way this one works is
an update file in yaml format is in a Known Location (I used github),
it's fetched, and saved in a local cache file. The update file
describes whatever different products are covered, with a version,
checksum, release date, download url, whatever else you need to
describe. In the simpleminded version it just returns true/false as to
whether an update is needed (probably would want to return the url to
download in the "true" case). Each script could import this and call it
with its name as the argument to see if it needs to update itself.
It's not huge, but too big for an email; lives here if anyone is curious:
no warranties, etc.
More information about the Tutor