Refactor how client prepares environment. Inputs may now reference local directories

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-01-28 14:58:13 -08:00
parent 6f4577d501
commit c4e55a6915
8 changed files with 251 additions and 217 deletions

View File

@@ -46,6 +46,17 @@ func (c *Component) ComputeScript() (*Script, error) {
return newScript(c.Config().Get("compute"))
}
// Return a list of local dirs required to compute this component.
// (Scanned from the arg `dir` of operations `do: "local"` in the
// compute script.
func (c *Component) LocalDirs(ctx context.Context) (map[string]string, error) {
s, err := c.ComputeScript()
if err != nil {
return nil, err
}
return s.LocalDirs(ctx)
}
// Compute the configuration for this component.
//
// Difference with Execute: