-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·36 lines (25 loc) · 774 Bytes
/
Makefile
File metadata and controls
executable file
·36 lines (25 loc) · 774 Bytes
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
VERSION := $(shell cat ./VERSION)
GO_LIST_FILES=$(shell go list github.com/proshik/githubstatbot/... | grep -v vendor)
all: build
build:
CGO_ENABLED=0 go build -v
test: vendor
go test -v ./...
cover: test
@> coverage.txt
@go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}} && cat {{.Dir}}/.coverprofile >> coverage.txt"{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c
fmt:
go fmt -x ./...
release:
git tag -a $(VERSION) -m "Release" || true
git push origin $(VERSION)
goreleaser --rm-dist
vendor: bootstrap
dep ensure
HAS_DEP := $(shell command -v dep;)
HAS_LINT := $(shell command -v golint;)
bootstrap:
ifndef HAS_DEP
go get -u github.com/golang/dep/cmd/dep
endif
.PHONY: build test cover fmt vendor release