forked from teslamotors/vehicle-command
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 722 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
LINTER = golangci-lint run -v $(LINTER_FLAGS) --exclude-use-default=false --timeout $(LINTER_DEADLINE)
LINTER_DEADLINE = 30s
LINTER_FLAGS ?=
ifneq (,$(wildcard /etc/alpine-release))
LINTER_FLAGS += --build-tags=musl
endif
all: build
linters:
@echo "** Running linters...**"
$(LINTER)
@echo "** SUCCESS **"
set-version:
if TAG=$$(git describe --tags --abbrev=0); then echo "$${TAG}" | sed 's/v//' > pkg/account/version.txt; fi
format: set-version
go fmt ./...
test: install
go test -cover ./...
go vet ./...
build: set-version test
go build ./...
install:
go install ./cmd/...
doc-images:
docker run -v ./:/data plantuml/plantuml "doc"
.PHONY: install build linters test format set-version doc-images