forked from metalmatze/transmission-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 766 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
GO ?= GO111MODULE=on CGO_ENABLED=0 go
PACKAGES = $(shell go list ./... | grep -v /vendor/)
.PHONY: all
all: install
.PHONY: clean
clean:
$(GO) clean -i ./...
.PHONY: install
install:
$(GO) install -v ./cmd/transmission-exporter
.PHONY: build
build:
$(GO) build -v ./cmd/transmission-exporter
.PHONY: fmt
fmt:
$(GO) fmt $(PACKAGES)
.PHONY: vet
vet:
$(GO) vet $(PACKAGES)
.PHONY: lint
lint:
@which golint > /dev/null; if [ $$? -ne 0 ]; then \
$(GO) get -u golang.org/x/lint/golint; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
.PHONY: dashboards
dashboards:
jsonnet fmt -i dashboards/transmission.jsonnet
jsonnet -J dashboards/vendor -m dashboards -e "(import 'dashboards/transmission.jsonnet').grafanaDashboards"