From 6039cb3d60cec407878d3335372b68290531f88c Mon Sep 17 00:00:00 2001 From: silenceper Date: Mon, 14 Oct 2019 19:25:34 +0800 Subject: [PATCH] Use BSD-compatible sed command in Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4feeb7c7..8bd13e6a 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,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 - + docker-build: cp deploy/Dockerfile $(TEMP_DIR) cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile @@ -48,7 +48,7 @@ docker-build: build-local-image: $(OUT_DIR)/$(ARCH)/adapter cp deploy/Dockerfile $(TEMP_DIR) cp $(OUT_DIR)/$(ARCH)/adapter $(TEMP_DIR) - cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|scratch|g" Dockerfile + cd $(TEMP_DIR) && sed -i- "s|BASEIMAGE|scratch|g" Dockerfile && rm Dockerfile- docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR) rm -rf $(TEMP_DIR)