Release management

After a snap has been created and released to the Snap Store, its published revisions can be moved between channels from both the command line and from the Snap Store web UI.

Moving a snap between channels helps to manage a user’s expectations in any trade-off between stability in the stable channel, and cutting edge features in the edge channel (as an arbitrary example). But its also a useful technique for beta testing, or for when a snap needs to revert to a previous revision.

See Releasing your app for details on how to upload and publish a snap if you haven’t done so already.

Release management

The web UI’s release management functionality is equivalent to using snapcraft release on the command line, and both require that you first login to the store.

To access the Snap Store web UI, go to https://snapcraft.io/store and either Create a developer account or login with your developer account credentials.

After logging in to the Snap Store and selecting a published snap, click the ‘Releases’ tab to access the release management functions.

The Releases page lists which revisions of a published snap will be delivered to users tracking a specific channel.

On the command line, with a developer account already created, enter the following to login:

$ snapcraft login

The command line equivalent to the web UI’s Releases page is the output from snapcraft status <snap-name>:

$ snapcraft status opencorsairlink 
Track    Arch     Channel    Version    Revision
latest   amd64    stable     61d336a    127
                  candidate  61d336a    127
                  beta       61d336a    127
                  edge       61d336a    127
         arm64    stable     46dbf20    95
                  candidate  46dbf20    95
                  beta       46dbf20    95
                  edge       61d336a    128
         armhf    stable     46dbf20    94
                  candidate  46dbf20    94
                  beta       46dbf20    94
                  edge       61d336a    129
[...]

To move a snap between channels in the web UI, simply drag a revision from one channel to another, or use the cog drop-down menu on a revision and select a destination.

Screenshot_20200828_125118

Click Save to make the requested change, or Revert to undo the proposed changes.

On the command line, the release command takes the snap name, the revision you wish to move and the destination channel (or channels) as its arguments:

$ snapcraft release mysnap 13 candidate

You can also move earlier revisions back into a channel:

$ snapcraft release mysnap 5 beta

See Channels for more details on how channels, tracks and branches can be used, or Publish to a branch for details on how snap developers can use branches to publish temporary snap releases.

Limiting distribution

A snap’s distribution can be limited from the Snap Store web UI by two options listed on a snap’s Settings page:

  • Visibility: controls who can see a snap and install a snap. See Public, Private and Unlisted snaps for more details.
  • Distribution: controls the territories where a snap can be installed or not installed, as outlined below.

The Distribution options set whether a snap can be installed in all territories (default), or whether its distribution is either

  • limited to selected territories
  • excluded from selected territories

Activating either of the Selected territories fields will open a drop-down list of territories from which to choose from. More than one territory can be added.

$ snapcraft release foo 0.2 
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try 'snapcraft -h' for help.

Error: No such command 'release'.

outdated docs?

Thanks for mentioning this - I think you’ve found a bug in snapcraft. For snapcraft release to work, it needs a snap name, revision and destination channel:

snapcraft release <name> <revision> <channels>

But as you’ve noticed, it seems that if snapcraft can’t parse arguments after a snap name, it no longer registers as a release command. I’ve just tried the same thing:

$ snapcraft release foo bar
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try 'snapcraft -h' for help.

Error: No such command 'release'.

Perhaps this is something the snapcraft team should look into @sergiusens?

1 Like