From fbb6dd0c88ebccbbe935da69c1c6fd94e45833a6 Mon Sep 17 00:00:00 2001 From: bangn Date: Thu, 1 Sep 2016 16:36:20 +1000 Subject: [PATCH 1/2] Correct GO_SRC find script. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 860109a85..f91ba100e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -GO_SRC := $(shell find -type f -name "*.go") +GO_SRC := $(shell find . -type f -name "*.go") CONTAINER_NAME ?= wrouesnel/postgres_exporter:latest From ff5a7fe25c5056ae3cf7e4bd1823cf3bc595e38e Mon Sep 17 00:00:00 2001 From: bangn Date: Thu, 1 Sep 2016 16:36:46 +1000 Subject: [PATCH 2/2] Correct build script. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f91ba100e..4327aa236 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: vet test postgres_exporter # Simple go build postgres_exporter: $(GO_SRC) - CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X main.Version=git:$(shell git rev-parse HEAD)" -o postgres_exporter . + CGO_ENABLED=0 go build -a -ldflags "-extldflags '-static' -X main.Version=git:$(shell git rev-parse HEAD)" -o postgres_exporter . # Take a go build and turn it into a minimal container docker: postgres_exporter