mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-02-08 22:36:55 +00:00
Make the makefile less Linux specific (find on OSX complains apparently).
This commit is contained in:
parent
286550f3bf
commit
db37da547e
4
Makefile
4
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
|
CONTAINER_NAME ?= wrouesnel/postgres_exporter:latest
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ all: vet test postgres_exporter
|
|||||||
|
|
||||||
# Simple go build
|
# Simple go build
|
||||||
postgres_exporter: $(GO_SRC)
|
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
|
# Take a go build and turn it into a minimal container
|
||||||
docker: postgres_exporter
|
docker: postgres_exporter
|
||||||
|
Loading…
Reference in New Issue
Block a user