On 12 August 2015 at 03:56, Tim Penhey <[email protected]> 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 <[email protected]> -- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
