Use of the
snap command with a directory has been deprecated in favour of the
introduced in snapcraft 2.35
snap command originally served two purposes:
snapcraft snapwalked through the entire lifecycle for each part of the project (pull, build, stage, and prime) before finally creating the snap, and
snapcraft snap <directory>simply created a snap of the provided directory (without involving the lifecycle at all).
This ended up being confusing from the point of view of someone working on an actual snapcraft project.
The new command
pack is much more explicit in that snapcraft is just focusing on assembling the final snap from a valid layout for a given directory.
The new way to create a snap from a directory has the following syntax:
snapcraft pack <directory>
See Deprecation notices for further announcements.
Last updated 1 year, 6 months ago. Help improve this document in the forum.