I have multiple containers on my device and each finish downloading a new version (“pin to release”) at different times.
I have a file I want to run on only container “my-service” only when we went from one version to another, so I need to be able to distinguish if we went from one version to another, is there a “current version” command and “future version” command for specific containers? I want to be able to run it from within the container
Thank you
Hi,
you can get the current version info from the supervisor
like it is described here Interacting with the balena Supervisor - Balena Documentation
to know the previous version I would save this info somewhere persistent, eg. Communicate outside the container - Balena Documentation
So your script could check the storage the value against the API response, if empty or or older continue, if equal exit.
Could that work for you?