SnapcraftBuilder¶
-
class
starlark_tugger.SnapcraftBuilder¶ The
SnapcraftBuildertype coordinates the invocation of thesnapcraftcommand.-
__init__(snap: Snap) → SnapcraftBuilder¶ SnapcraftBuilder()constructs a new instance from aSnap.It accepts the following arguments:
snap- The
Snapdefining the configuration to be used.
-
add_invocation(args: List[str], purge_build: Optional[bool])¶ This method registers an invocation of
snapcraftwith the builder. When this instance is built, all registered invocations will be run sequentially.The following arguments are accepted:
args- Arguments to pass to
snapcraftexecutable. purge_buildWhether to purge the build directory before running this invocation.
If not specified, the build directory is purged for the first registered invocation and not purged for all subsequent invocations.
-
add_file_manifest(manifest: FileManifest)¶ This method registers the content of a
FileManifestwith the build environment for this builder.When this instance is built, the content of the passed manifest will be materialized in a directory next to the
snapcraft.yamlfile this instance is building.The following arguments are accepted:
manifest- Defines files to install in the build environment.
-
build(target: str) → ResolvedTarget¶ This method invokes the builder and runs
snapcraft.The following arguments are accepted:
target- The name of the build target.
This method returns a
ResolvedTarget. That target is not runnable.
-