Managing breaking changes in command line Snap

I’ve written a piece of open source command line software which I’d like to make available as a Snap, since that seems the easiest way to allow users to install it across multiple Linux distributions and permit a rapid release cycle.

One problem I can foresee though is that Snaps are updated automatically to the latest version without any interaction from, or even a notification to, the user. I’ve changed the command line arguments for the software multiple times in ways that are not backwards-compatible, and whilst I always bump the major version number (e.g. 2.0.1 becomes 3.0.0), my understanding is that this doesn’t have any particular meaning to snapd. If users have a script which runs my software, it would suddenly fail when they are automatically upgraded to 3.0.0, which is a poor user experience and not something I want to do.

I have looked at Snap epochs but they seem to be aimed at configuration file changes, whereas I am changing the interface of the software. Can Snap epochs be used for my use case as well, or is there another way to handle this smoothly?

tracks shoud be what you are looking for …

1 Like

Refer:

2 Likes