mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
[build] fix build makefile target path
The `build` Makefile target attempted to place the generated artifact in `/build`, where it should have used a local directory instead. This commit makes the directory configurable using the `OUT_DIR` argument, and defaults it to ./_output
This commit is contained in:
parent
6f4f0ea2f9
commit
3618aafca4
2 changed files with 3 additions and 2 deletions
3
Makefile
3
Makefile
|
|
@ -4,6 +4,7 @@ TEMP_DIR:=$(shell mktemp -d)
|
|||
ARCH?=amd64
|
||||
ALL_ARCH=amd64 arm arm64 ppc64le s390x
|
||||
ML_PLATFORMS=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x
|
||||
OUT_DIR?=./_output
|
||||
|
||||
VERSION?=latest
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ endif
|
|||
|
||||
all: docker-build
|
||||
build:
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o $(OUT_DIR)/$(ARCH)/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
|
||||
docker-build:
|
||||
cp deploy/Dockerfile $(TEMP_DIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue