Skip to content

Commit

Permalink
Merge pull request #1210 from jonjohnsonjr/buildmode
Browse files Browse the repository at this point in the history
Add buildmode to go/build
  • Loading branch information
jonjohnsonjr committed May 14, 2024
2 parents 2fbc085 + d577c84 commit 5cbb58a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/build/pipelines/go/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ inputs:
GOARM64 microarchitecture level to use
default: "v8.0"

buildmode:
description: |
The -buildmode flag value. See "go help buildmode" for more information.
default: "default"

pipeline:
- runs: |
LDFLAGS="${{inputs.strip}} ${{inputs.ldflags}}"
Expand All @@ -116,4 +121,4 @@ pipeline:
[ -e /home/build/go.mod.local ] && cp /home/build/go.mod.local go.mod
[ -e /home/build/go.sum.local ] && cp /home/build/go.sum.local go.sum
GOAMD64="${{inputs.amd64}}" GOARM64="${{inputs.arm64}}" GOEXPERIMENT="${{inputs.experiments}}" go build -o "${{targets.contextdir}}"/${BASE_PATH} -tags "${{inputs.toolchaintags}},${{inputs.tags}}" -ldflags "${LDFLAGS}" -trimpath ${{inputs.packages}}
GOAMD64="${{inputs.amd64}}" GOARM64="${{inputs.arm64}}" GOEXPERIMENT="${{inputs.experiments}}" go build -o "${{targets.contextdir}}"/${BASE_PATH} -tags "${{inputs.toolchaintags}},${{inputs.tags}}" -ldflags "${LDFLAGS}" -trimpath -buildmode ${{inputs.buildmode}} ${{inputs.packages}}

0 comments on commit 5cbb58a

Please sign in to comment.