Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Unverified Commit 0d446f13 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Use $GOOS

parent 270bb5a1
Branches
Tags 2.1.1
No related merge requests found
......@@ -2,19 +2,19 @@ DEPS = $(wildcard */*.go)
VERSION = $(shell git describe --always --dirty)
COMMIT_SHA1 = $(shell git rev-parse HEAD)
BUILD_DATE = $(shell date +%Y-%m-%d)
OS = linux
GOOS = linux
ARCH = amd64
all: vendor lint vet prometheus-puppetdb-exporter
prometheus-puppetdb-exporter: main.go $(DEPS)
GO111MODULE=on CGO_ENABLED=0 GOOS=linux \
GO111MODULE=on CGO_ENABLED=0 GOOS=$(GOOS) \
go build -a \
-ldflags="-X main.version=$(VERSION) -X main.commitSha1=$(COMMIT_SHA1) -X main.buildDate=$(BUILD_DATE)" \
-installsuffix cgo -o $@ $<
strip $@
release: prometheus-puppetdb-exporter-$(VERSION).$(OS)-$(ARCH).tar.gz
release: prometheus-puppetdb-exporter-$(VERSION).$(GOOS)-$(ARCH).tar.gz
%.tar.gz: prometheus-puppetdb-exporter LICENSE
tar cvzf $@ --transform 's,^,$*/,' $^
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment