parent
8e1542e7f4
commit
9573c83179
@ -0,0 +1 @@ |
||||
.gitignore |
@ -0,0 +1,18 @@ |
||||
.PHONY: all test build-binary install clean |
||||
|
||||
GO ?= go
|
||||
GO_CMD := CGO_ENABLED=0 $(GO)
|
||||
GIT_VERSION := $(shell git describe --tags --dirty)
|
||||
VERSION := $(GIT_VERSION:v%=%)
|
||||
GIT_COMMIT := $(shell git rev-parse HEAD)
|
||||
|
||||
all: test build-binary |
||||
|
||||
test: |
||||
$(GO_CMD) test -cover ./...
|
||||
|
||||
build-binary: |
||||
$(GO_CMD) build -tags netgo -ldflags "-w -X main.Version=$(VERSION) -X main.GitCommit=$(GIT_COMMIT)" -o netatmo-exporter .
|
||||
|
||||
clean: |
||||
rm -f netatmo-exporter
|
Loading…
Reference in new issue