stdlib package: llb

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-03-13 08:04:03 +00:00
parent b1b534992a
commit 54a2fe4393
13 changed files with 145 additions and 132 deletions

View File

@@ -3,6 +3,7 @@ package file
import (
"strings"
"dagger.io/dagger"
"dagger.io/llb"
)
#Create: {
@@ -11,7 +12,7 @@ import (
contents: string | bytes
#compute: [
dagger.#WriteFile & {dest: filename, content: contents, mode: permissions},
llb.#WriteFile & {dest: filename, content: contents, mode: permissions},
]
}
@@ -24,7 +25,7 @@ import (
orig: (#read & {path: filename, "from": from}).data
#compute: [
dagger.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions},
llb.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions},
]
}
@@ -40,8 +41,8 @@ import (
data: {
string
#compute: [
dagger.#Load & {"from": from},
dagger.#Export & {source: path},
llb.#Load & {"from": from},
llb.#Export & {source: path},
]
}
}
@@ -62,11 +63,11 @@ _#glob: {
string
_tmppath: "/tmp/ls.out"
#compute: [
dagger.#Load & {"from": from},
dagger.#Exec & {
llb.#Load & {"from": from},
llb.#Exec & {
args: ["sh", "-c", "ls \(glob) > \(_tmppath)"]
},
dagger.#Export & {source: _tmppath},
llb.#Export & {source: _tmppath},
]
}
}