dagger.#FS support
- Implement dagger.#FS support - Migrate `context.imports` to dagger.#FS - Backward compat: dagger.#FS can be passed in lieu of a dagger.#Artifact - For instance, an import (`dagger.#FS`) can be passed to the current `yarn.#Package` implementation Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
14
plan/task/util.go
Normal file
14
plan/task/util.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/moby/buildkit/client/llb"
|
||||
"go.dagger.io/dagger/compiler"
|
||||
)
|
||||
|
||||
func withCustomName(v *compiler.Value, format string, a ...interface{}) llb.ConstraintsOpt {
|
||||
prefix := fmt.Sprintf("@%s@", v.Path().String())
|
||||
name := fmt.Sprintf(format, a...)
|
||||
return llb.WithCustomName(prefix + " " + name)
|
||||
}
|
Reference in New Issue
Block a user