mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
update
This commit is contained in:
51
cue.mod/pkg/universe.dagger.io/go/build.cue
generated
Executable file
51
cue.mod/pkg/universe.dagger.io/go/build.cue
generated
Executable file
@@ -0,0 +1,51 @@
|
||||
package go
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
// Build a go binary
|
||||
#Build: {
|
||||
// Source code
|
||||
source: dagger.#FS
|
||||
|
||||
// Target package to build
|
||||
package: *"." | string
|
||||
|
||||
// Target architecture
|
||||
arch: *"amd64" | string
|
||||
|
||||
// Target OS
|
||||
os: *"linux" | string
|
||||
|
||||
// Build tags to use for building
|
||||
tags: *"" | string
|
||||
|
||||
// LDFLAGS to use for linking
|
||||
ldflags: *"" | string
|
||||
|
||||
env: [string]: string
|
||||
|
||||
container: #Container & {
|
||||
"source": source
|
||||
"env": {
|
||||
env
|
||||
GOOS: os
|
||||
GOARCH: arch
|
||||
}
|
||||
command: {
|
||||
args: [package]
|
||||
flags: {
|
||||
build: true
|
||||
"-v": true
|
||||
"-tags": tags
|
||||
"-ldflags": ldflags
|
||||
"-o": "/output/"
|
||||
}
|
||||
}
|
||||
export: directories: "/output": _
|
||||
}
|
||||
|
||||
// Directory containing the output of the build
|
||||
output: container.export.directories."/output"
|
||||
}
|
||||
Reference in New Issue
Block a user