The team behind Snapcraft is pleased to announce the release of Snapcraft 7.0, a major update to the tool used to build snap packages.
This release marks the end of an initial process to rebuild our tools to work across a variety of projects, and many of the changes reflect that development work. This includes a new lifecycle and the introduction of Craft Parts as a generic cross-project mechanism for obtaining data from different sources.
Among the many any other updates, fixes and additions, the following are what we consider its highlights:
core22
baseFor general details, including installation instructions, see Snapcraft overview, or take a look at Snapcraft release notes for other Snapcraft releases.
These changes are now applicable when switching to core22
:
craftctl
tool replaces snapcraftctl
craftctl default
replaces snapcraftctl <step-name>
craftctl set version=<value>
replaces snapcraftctl set-version <value>
CRAFT_*
environment variables are defined during step execution, replacing SNAPCRAFT_*
variables.try
has been removed from advanced grammar.The following are not currently supported with core22
:
Missing features will be ported and added to upcoming 7.x releases. If your snap relies on any of these features, please wait for the next releases to port them to use base: core22
.
See How to migrate from core20 to core22 10 for help on migrating your snaps to the new base.
The build environment is now created through a new API called Craft Providers, and consequently, Snapcraft now defaults to using LXD.
To align with the other craft tools, the snapping process now uses the pack command rather than the now deprecated snap command:
snapcraft pack
Running snapcraft
with no arguments is still supported and defaults to packing.
Snapcraft has migrated to using a new Craft Store tool to access the snap store. As a result, The authentication mechanism has changed, impacting any project already using CI/CD.
The snapcraft login --with
command structure is no longer supported or required. The value of export login now needs to be exported into the appropriate environment variable (i.e.; SNAPCRAFT_STORE_CREDENTIALS
).
Additionally, a working keyring is required to be able to store credentials locally.
To change the authentication mechanism, replace snapcraft login --enable-experimental-login
, with SNAPCRAFT_STORE_AUTH=candid
.
The snapcraft list
command to show which snap names are associated with your account has been deprecated and replaced with snapcraft names
.
snapcraft names
Last updated 2 years ago.