mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
Fix incorrect arch build for ARM64 in multiarch images (#252)
GOARCH was used instead of the input variable when building mulitarch images. Fixes #237 Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
SHELL = /usr/bin/env bash -o pipefail
|
SHELL = /usr/bin/env bash -o pipefail
|
||||||
.SHELLFLAGS = -ec
|
.SHELLFLAGS = -ec
|
||||||
|
|
||||||
GOARCH = $(shell go env GOARCH)
|
|
||||||
ifeq (,$(shell go env GOBIN))
|
ifeq (,$(shell go env GOBIN))
|
||||||
GOBIN = $(shell go env GOPATH)/bin
|
GOBIN = $(shell go env GOPATH)/bin
|
||||||
else
|
else
|
||||||
@@ -49,10 +48,10 @@ test-e2e: build-image
|
|||||||
cd ./test/e2e && IMG_REF=${IMG_REF} go test ./... -v -count 1
|
cd ./test/e2e && IMG_REF=${IMG_REF} go test ./... -v -count 1
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: generate bin/linux-$(GOARCH)/netbird-operator
|
build: generate bin/linux-$(shell go env GOARCH)/netbird-operator
|
||||||
|
|
||||||
bin/linux-%/netbird-operator: $(shell find api cmd internal pkg) go.mod go.sum
|
bin/linux-%/netbird-operator: $(shell find api cmd internal pkg) go.mod go.sum
|
||||||
@CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) go build -ldflags="-w -s" -trimpath -o $@ cmd/main.go
|
@CGO_ENABLED=0 GOOS=linux GOARCH=$* go build -ldflags="-w -s" -trimpath -o $@ cmd/main.go
|
||||||
|
|
||||||
.PHONY: build-image
|
.PHONY: build-image
|
||||||
build-image: build
|
build-image: build
|
||||||
|
|||||||
Reference in New Issue
Block a user