Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

An error occurred while submitting your form. Please try again or file a bug report. Close

  1. Blog
  2. Article

Igor Ljubuncic
on 27 August 2020


Snapcraft channels and, consequently, tracks are an important, highly useful element of the snap ecosystem. Tracks enable snap developers to publish multiple supported releases of their application under the same snap name. All snaps must have a default track – called latest, but there can be many others, giving both developers flexibility in how they release their applications to end users.

So far, track management was only possible through the Snap Store Web interface, which we have extensively reviewed last week. Now, you can view tracks, and very shortly, you will also be able set the default track using the snapcraft command line. We wanted to use this opportunity to showcase this upcoming set of features.

Ready, snap, set

The first thing you may want to do is check the availability of existing tracks for a given snaps. This can be done using the snapcraft list-tracks command (snapcraft 4.2 onwards), for instance:

snapcraft list-tracks node
Name    Status    Creation-Date         Version-Pattern
latest  active    -                     -
6       active    2018-02-27T13:25:05Z  -
8       active    2018-02-27T13:26:02Z  -
9       active    2018-02-27T13:26:08Z  -
10      active    2018-02-27T13:26:19Z  -
11      active    2018-10-31T16:25:48Z  -
12      default   2019-04-26T13:15:26Z  -
13      active    2019-10-18T13:34:01Z  -
14      active    2020-04-23T10:45:32Z  -

Now, as a publisher, if you want to change the default track of your application (snapcraft 4.3 onwards), you can also accomplish this on the command line – the specified default track must already exist, though.

snapcraft set-default-track “snap” “track”
snapcraft set-default-track kompozer legacy
Default track for 'kompozer' set to 'legacy'.

This can be quite useful if you’re managing multiple (supported) releases of your applications, or if you want to automate the functionality through a CI/CD system. Furthermore, publishers with a large number of snaps should also find this of value.

Summary

Snapcraft is constantly gaining new capabilities, designed to simplify and accelerate the process of snap publication. The elegance of the tool is that it provides both application development and Snap Store features, allowing you to accomplish a significant portion of your snap journey right there, in the terminal window. Default tracks are just the latest example. More good things are coming, so stay tuned. Meanwhile, if you have any requests or suggestions on what snapcraft ought to do, please join our forum for a discussion.

Photo by Borna Bevanda on Unsplash.

Related posts


Igor Ljubuncic
16 June 2023

Snapcraft 8.0 and the respectable end of core18

Ubuntu Article

‘E’s not pinin’! ‘E’s passed on! This base is no more! He has ceased to be! ‘E’s expired and gone to meet ‘is maker! ‘E’s a stiff! Bereft of life, ‘e rests in peace! If you hadn’t nailed ‘im to the perch ‘e’d be pushing up the daisies! ‘Is software processes are now ‘istory! ‘E’s ...


gbeuzeboc
25 September 2024

TurtleBot3 OpenCR firmware update from a snap

IoT Article

The TurtleBot3 robot is a standard platform robot in the ROS community, and it’s a reference that Canonical knows well, since we’ve used it in our tutorials. As a matter of fact, we use it to demonstrate some of our work, such as distributing a ROS stack through snaps. This robot embeds two boards, a ...


Holly Hall
15 January 2024

Managing software in complex network environments: the Snap Store Proxy

Internet of Things Article

As enterprises grapple with the evolving landscape of security threats, the need to safeguard internal networks from the broader internet is increasingly important. In environments with restricted internet access, it can be difficult to manage software updates in an easy, reliable way. When managing devices in the field, change management ...