Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit dc0fbd6

Browse files
committed
Adds GOARCH option to build
Signed-off-by: JoshVanL <[email protected]>
1 parent 9df6489 commit dc0fbd6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ BINDIR ?= $(CURDIR)/bin
33
HACK_DIR ?= hack
44
PATH := $(BINDIR):$(PATH)
55
ARTIFACTS ?= artifacts
6+
ARCH ?= amd64
67

78
SHELL = /bin/bash -o pipefail
89

@@ -99,7 +100,7 @@ build: generate ## build kube-oidc-proxy
99100
CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)' -o ./bin/kube-oidc-proxy ./cmd/.
100101

101102
docker_build: generate test build ## build docker image
102-
GOOS=linux CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)' -o ./bin/kube-oidc-proxy-linux ./cmd/.
103+
GOARCH=$(ARCH) GOOS=linux CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)' -o ./bin/kube-oidc-proxy-linux ./cmd/.
103104
docker build -t kube-oidc-proxy .
104105

105106
all: test build ## runs tests, build

test/kind/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (k *Kind) runCmdWithOut(w io.Writer, command string, args ...string) error
128128
cmd.Env = append(cmd.Env,
129129
"GO111MODULE=on", "CGO_ENABLED=0", "HOME="+os.Getenv("HOME"),
130130
"PATH="+os.Getenv("PATH"),
131-
"GOOS=linux")
131+
"GOARCH=amd64", "GOOS=linux")
132132

133133
if err := cmd.Start(); err != nil {
134134
return err

0 commit comments

Comments
 (0)