Retrieving artifact version in state script

I should implement a user confirmation before installing an update; the confirmation procedure should be different when the update is a just a bug fix or feature changes. In order to decide which procedure to adopt, the confirmation app needs to know the artifact version. I’d like to prepare a state script (ArtifactInstall_Enter) that communicates to the confirmation app the artifact version but, as far as I understood, Mender client do not pass such info to a state script. Is there another way to retrieve it?

Thanks

Hi @I_Iob,

Sorry, but there is no direct way to get this kind of information. The most elegant way is to have separate state scripts for the desired functionality and then package them into the artefacts as needed, as during artefact construction time the time is known.

Greets,
Josef