The ‘prepare’ keyword has been replaced by 'override-build’
introduced in snapcraft 2.41
prepare scriptlet was originally introduced as a way to “prepare” for a build. However, as part of an effort to add support for Snapcraft to have this for all lifecycle steps (i.e. not just build), a new scriptlet has been added that encompasses this functionality called
override-build allows you to override the default
build step with your own logic, from which you can call
snapcraftctl build to run the default
Let’s say you currently had a
prepare scriptlet that looked like this:
prepare: | echo "This runs before build!"
To get equivalent functionality with the
override-build scriptlet, try this:
override-build: | echo "This runs before build!" snapcraftctl build
See Deprecation notices for further announcements.
Last updated 1 year, 8 months ago. Help improve this document in the forum.