From 213b2e94c11312251b19a92f89586950d8fdb658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=9B=BD=E5=BF=A0?= <249032432@qq.com> Date: Mon, 20 May 2019 14:59:10 +0800 Subject: [PATCH] DirectXMan12/k8s-prometheus-adapter/issues/199 https://github.com/DirectXMan12/k8s-prometheus-adapter/issues/199#issue-445673744 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9efdb480..f9eb86c8 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ REGISTRY?=directxman12 IMAGE?=k8s-prometheus-adapter TEMP_DIR:=$(shell mktemp -d) ARCH?=amd64 +GOOS=linux ALL_ARCH=amd64 arm arm64 ppc64le s390x ML_PLATFORMS=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x OUT_DIR?=./_output @@ -32,7 +33,7 @@ all: $(OUT_DIR)/$(ARCH)/adapter src_deps=$(shell find pkg cmd -type f -name "*.go") $(OUT_DIR)/%/adapter: $(src_deps) - CGO_ENABLED=0 GOARCH=$* go build -tags netgo -o $(OUT_DIR)/$*/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter + CGO_ENABLED=0 GOARCH=$* GOOS=$(GOOS) go build -tags netgo -o $(OUT_DIR)/$*/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter docker-build: cp deploy/Dockerfile $(TEMP_DIR)