From d96e4f55757797a3d3c9ef193d2306f315d4d966 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 3 Jun 2021 10:44:10 +0000 Subject: [PATCH 1/3] universe: docker: simplify Signed-off-by: Solomon Hykes --- stdlib/docker/client.cue | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/stdlib/docker/client.cue b/stdlib/docker/client.cue index 35621e67..1810efd4 100644 --- a/stdlib/docker/client.cue +++ b/stdlib/docker/client.cue @@ -1,18 +1,16 @@ package docker import ( - "dagger.io/dagger/op" "dagger.io/alpine" ) -#Client: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: jq: true - package: curl: true - package: "openssh-client": true - package: "docker-cli": true - } - }, -] +// A container image to run the Docker client +#Client: alpine.#Image & { + package: { + bash: true + jq: true + curl: true + "openssh-client": true + "docker-cli": true + } +} From f308e51892a8fd724674c4348895452c6bd5a2e1 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 3 Jun 2021 10:45:05 +0000 Subject: [PATCH 2/3] universe: file: mark as deprecated Signed-off-by: Solomon Hykes --- stdlib/file/file.cue | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/file/file.cue b/stdlib/file/file.cue index 1e811272..226338be 100644 --- a/stdlib/file/file.cue +++ b/stdlib/file/file.cue @@ -1,3 +1,4 @@ +// DEPRECATED: see dagger.io/os package file import ( From 89e3bb052e749b245389191d1f879e73baab2fd7 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 3 Jun 2021 10:46:14 +0000 Subject: [PATCH 3/3] universe: git: comments, use null defaults Signed-off-by: Solomon Hykes --- stdlib/git/git.cue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/stdlib/git/git.cue b/stdlib/git/git.cue index aa07e4eb..2519c303 100644 --- a/stdlib/git/git.cue +++ b/stdlib/git/git.cue @@ -9,16 +9,23 @@ import ( // A git repository #Repository: { - remote: string @dagger(input) - ref: string @dagger(input) - subdir: string | *"" @dagger(input) + // Git remote. + // Example: "https://github.com/dagger/dagger") + remote: string @dagger(input) + + // Git ref: can be a commit, tag or branch. + // Example: "main" + ref: string @dagger(input) + + // (optional) Subdirectory + subdir: string | *null @dagger(input) #up: [ op.#FetchGit & { "remote": remote "ref": ref }, - if subdir != "" { + if subdir != null { op.#Subdir & { dir: subdir }