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:
snapThe
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:
argsArguments 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:
manifestDefines files to install in the build environment.
- build(target: str) ResolvedTarget¶
This method invokes the builder and runs
snapcraft.The following arguments are accepted:
targetThe name of the build target.
This method returns a
ResolvedTarget. That target is not runnable.