Remove the hardcoded GOOS value when building the Linux binary to enable support for container image for ARM

Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
Cosmin Cojocar 2023-10-25 10:13:32 +02:00 committed by Cosmin Cojocar
parent fa1b74d4fc
commit 2f9965bfbd

View file

@ -17,7 +17,7 @@ GOSEC ?= $(GOBIN)/gosec
GINKGO ?= $(GOBIN)/ginkgo GINKGO ?= $(GOBIN)/ginkgo
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2) GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
GOVULN_MIN_VERSION = 17 GOVULN_MIN_VERSION = 17
GO_VERSION = 1.20 GO_VERSION = 1.21
default: default:
$(MAKE) build $(MAKE) build
@ -76,7 +76,7 @@ release:
goreleaser release goreleaser release
build-linux: build-linux:
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags=$(BUILDFLAGS) -o $(BIN) ./cmd/gosec/ CGO_ENABLED=$(CGO_ENABLED) GOOS=linux go build -ldflags=$(BUILDFLAGS) -o $(BIN) ./cmd/gosec/
image: image:
@echo "Building the Docker image..." @echo "Building the Docker image..."