Adding global metadata
Attributes include a snap’s name and description, its level of confinement, and where the application icon can be found.
name: qfsview summary: Visualise storage utilisation. description: | qFSView displays files and folders as a rectangle with an area proportional to the storage they and their children use. version: 1.0 icon: gui/qfsview.png base: core18 grade: stable confinement: strict
For the complete list of global metadata, see Snapcraft top-level metadata.
Recommended global metadata
Global metadata is a mixture of mandatory and optional values.
You can generate a buildable template of both required and recommended values with the
snapcraft init command in a new project folder (see Snapcraft overview for more details).
The following attributes are mandatory:
A snap’s name is important. It must start with an ASCII character and can only contain 1) letters in lower case, 2) numbers, and 3) hyphens, and it can’t start or end with a hyphen. For the Snap Store, it also needs to be both unique and easy to find.
For help on choosing a name and registering it on the Snap Store, see Registering your app name.
The summary is a short descriptive sentence to tell prospective users about an application’s
primary purpose, in fewer than 80 characters.
Unlike the summary, the description can be as verbose as you need it to be. You can also use a chevron (‘>’) to split its content across multiple lines. While you shouldn’t write thousands of words, the more details you provide, the more likely people are to discover and use your application. Feature lists, update descriptions, a brief Getting started guide, are legitimate uses for the summary.
While having a value for version is mandatory, its value can be anything. Setting this to something like
testmakes sense while you’re first building your snap, and you can later replace this with a specific version, or a reference to a script that replaces the version number automatically.
The value for version is also commonly imported for external metadata. See Using using external metadata for further details.
The following attributes should also be included:
A base snap is a special kind of snap that provides a run-time environment with a minimal set of libraries that are common to most applications.
See Base snaps for help selecting a base for your snap.
This should initially be
develand changed to
stablewhen you have a snap ready for release.
A snap’s confinement level is the degree of isolation it has from your system. When first building a snap, set this to
devmodeto initially limit the side-effects of confinement until you have a working snap.
See Snap confinement for further details.
Two further global attribites are
parts:. These expand into separate sections that deal with how your snap is built and where its various resources are located. See Adding parts for the next logical step in snap building.
Last updated 1 year, 5 months ago.