A few questions about snapctl and app version/update


#1

Hi,

I have a few questions about snap update (I won’t ask for a way to disable auto-update don’t worry).

  • I would like to display my snap version in the web interface of my app, is there a way to do it ? I tried with a snapctl list just like there is a snap list but it is an unknown command.

  • I also would like to be able, through my app web interface, to manually check for update and change the current track or channel. Is it doable ? Do you plan to add a snapctl refresh command or something similar ?

Thank you,


#2

For this, you can just look at the version file located at $SNAP/meta/snap.yaml

Eventually this will be implemented as per [WIP] Refresh App Awareness but I don’t think all of that is available yet


#3

Or just the $SNAP_VERSION environment variable, no?


#4

oh yeah that too :slight_smile:


#5

$SNAP_VERSION is exactly what I wanted.

About the refresh, I will keep an eye on upcoming updates, thank you!