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 our team. We will be in touch shortly.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 ...


Igor Ljubuncic
21 March 2023

Craft team welcomes you to another episode of its adventures

Ubuntu Article

Welcome to the second article in the Craft team saga. Previously, on Craft Team, we gave you a brief introduction into the team’s function, we announced our desire to share the ins and outs of our day-to-day work with the community, and gave you an overview of roughly two weeks of coding and fun. Today, ...


Igor Ljubuncic
6 March 2023

What happens in the Craft team stays in the Craft team … until today

Ubuntu Article

Snapcraft, Charmcraft, Rockcraft … you may have heard of these tools, but have you ever wondered how – and by who – they are developed? These tools are the intellectual and keyboard-driven product of Canonical’s Craft team. Officially, the team’s name is *Craft, and the asterisk symbol can easily be seen as a “star” (The ...