Merge pull request #1644 from shykes/go-fix

go.#Build: small improvements
This commit is contained in:
Solomon Hykes 2022-02-23 14:05:13 -08:00 committed by GitHub
commit 1135398bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 8 deletions

View File

@ -43,8 +43,9 @@ import (
"-o": "/output/" "-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"
} }

View File

@ -36,9 +36,6 @@ import (
dest: _cachePath dest: _cachePath
} }
} }
env: { env: GOMODCACHE: _cachePath
CGO_ENABLED: "0"
GOMODCACHE: _cachePath
}
} }
} }

View File

@ -27,7 +27,7 @@ dagger.#Plan & {
env: NAME: "dagger" env: NAME: "dagger"
mounts: binary: { mounts: binary: {
dest: "/bin/hello" dest: "/bin/hello"
contents: build.binary contents: build.output
source: "/test" source: "/test"
} }
} }

View File

@ -15,7 +15,7 @@ dagger.#Plan & {
command: args: ["version"] command: args: ["version"]
} }
overide: { override: {
base: alpine.#Build & { base: alpine.#Build & {
packages: go: _ packages: go: _
} }