SnapcraftBuilder
¶
- class starlark_tugger.SnapcraftBuilder¶
The
SnapcraftBuilder
type coordinates the invocation of thesnapcraft
command.- __init__(snap: Snap) SnapcraftBuilder ¶
SnapcraftBuilder()
constructs a new instance from aSnap
.It accepts the following arguments:
snap
The
Snap
defining the configuration to be used.
- add_invocation(args: List[str], purge_build: Optional[bool])¶
This method registers an invocation of
snapcraft
with the builder. When this instance is built, all registered invocations will be run sequentially.The following arguments are accepted:
args
Arguments to pass to
snapcraft
executable.purge_build
Whether 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
FileManifest
with 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.yaml
file 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.