Builds

A build is a particular instance of building a target.

When you run tg build, either an existing build is found for the target, or a new build is created.

export default tg.target(() => {
// Sleep for ten seconds.
await tg.sleep(10);
return "Hello, World!";
});
# Build the target. The `--detach` or `-d` flag outputs the build's ID and returns immediately rather than waiting for the build to complete.
$ tg build -d
bld_deadbeef
# Get the build's status.
$ tg build status bld_deadbeef
started
# Wait for the build to finish and get its output.
$ tg build output bld_deadbeef
"Hello, World!"

Builds are not objects because they are mutable. Their IDs are not content addresses, they are randomly assigned.