Use case for: min-version

Stuart Bishop stuart.bishop at canonical.com
Wed Aug 12 09:02:21 UTC 2015


On 12 August 2015 at 03:56, Tim Penhey <tim.penhey at canonical.com> wrote:
> It would be trivial for the Juju version to be exported in the hook
> context as environment variables.
>
> Perhaps something like this:
>
> JUJU_VERSION=1.24.4
> JUJU_VERSION_MAJOR=1
> JUJU_VERSION_MINOR=24
> JUJU_VERSION_PATCH=4
> # tag for 'alpha' 'beta'
> JUJU_VERSION_TAG=
>
> Thoughts?

Whatever :-)

An environment variable seems the obvious way to communicate the
information. Give me a version string like 1.24.4 and I'm happy. The
trick is documenting and sticking to the format, so I know if one day
you might throw 1.26.1-alpha6 at me.

So do it if it really is trivial, or if not try not to break the work
around in charm-helpers (parsing the output of
"/var/lib/juju/tools/machine-*/jujud version")


-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju-dev mailing list