From f6cee7f306892f2e5a0f2aeb61244ab3b04d9fc5 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Mon, 21 Feb 2022 05:31:50 +0000 Subject: [PATCH] go.#Build: small improvements Signed-off-by: Solomon Hykes --- pkg/universe.dagger.io/go/build.cue | 5 +++-- pkg/universe.dagger.io/go/container.cue | 5 +---- pkg/universe.dagger.io/go/test/build.cue | 2 +- pkg/universe.dagger.io/go/test/container.cue | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/universe.dagger.io/go/build.cue b/pkg/universe.dagger.io/go/build.cue index 34464d5a..eb0a080e 100644 --- a/pkg/universe.dagger.io/go/build.cue +++ b/pkg/universe.dagger.io/go/build.cue @@ -43,8 +43,9 @@ import ( "-o": "/output/" } } - export: directories: "/output/": _ + export: directories: "/output": _ } - binary: container.export.directories."/output/" + // Directory containing the output of the build + output: container.export.directories."/output" } diff --git a/pkg/universe.dagger.io/go/container.cue b/pkg/universe.dagger.io/go/container.cue index 81e00f28..b4338cf0 100644 --- a/pkg/universe.dagger.io/go/container.cue +++ b/pkg/universe.dagger.io/go/container.cue @@ -36,9 +36,6 @@ import ( dest: _cachePath } } - env: { - CGO_ENABLED: "0" - GOMODCACHE: _cachePath - } + env: GOMODCACHE: _cachePath } } diff --git a/pkg/universe.dagger.io/go/test/build.cue b/pkg/universe.dagger.io/go/test/build.cue index 8f8dba2c..886ea869 100644 --- a/pkg/universe.dagger.io/go/test/build.cue +++ b/pkg/universe.dagger.io/go/test/build.cue @@ -27,7 +27,7 @@ dagger.#Plan & { env: NAME: "dagger" mounts: binary: { dest: "/bin/hello" - contents: build.binary + contents: build.output source: "/test" } } diff --git a/pkg/universe.dagger.io/go/test/container.cue b/pkg/universe.dagger.io/go/test/container.cue index ac7056c7..4ca4bd6f 100644 --- a/pkg/universe.dagger.io/go/test/container.cue +++ b/pkg/universe.dagger.io/go/test/container.cue @@ -15,7 +15,7 @@ dagger.#Plan & { command: args: ["version"] } - overide: { + override: { base: alpine.#Build & { packages: go: _ }