tendermint/Makefile

83 lines
1.8 KiB
Makefile
Raw Normal View History

2017-06-01 20:32:55 -07:00
GOTOOLS = \
github.com/mitchellh/gox \
github.com/Masterminds/glide \
github.com/alecthomas/gometalinter
2015-12-17 13:46:04 -08:00
all: protoc install test
2016-01-30 19:36:33 -08:00
2017-01-12 12:47:55 -08:00
NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/
2016-11-09 17:12:29 -08:00
2017-01-10 06:59:29 -08:00
install-protoc:
# Download: https://github.com/google/protobuf/releases
go get github.com/golang/protobuf/protoc-gen-go
2016-01-30 19:36:33 -08:00
protoc:
2017-01-16 21:58:42 -08:00
@ protoc --go_out=plugins=grpc:. types/*.proto
2015-12-17 13:46:04 -08:00
2016-11-09 17:12:29 -08:00
install:
@ go install ./cmd/...
2015-12-17 13:46:04 -08:00
2017-01-16 22:33:48 -08:00
build:
@ go build -i ./cmd/...
2017-01-16 22:33:48 -08:00
2017-06-01 20:32:55 -07:00
dist:
2017-06-02 09:44:00 -07:00
@ bash scripts/dist.sh
2017-06-01 20:32:55 -07:00
@ bash scripts/publish.sh
2017-01-12 03:37:47 -08:00
# test.sh requires that we run the installed cmds, must not be out of date
test: install
2017-05-04 12:24:58 -07:00
find . -path ./vendor -prune -o -name *.sock -exec rm {} \;
2017-01-27 22:27:32 -08:00
@ go test -p 1 `${NOVENDOR}`
2017-01-16 21:58:42 -08:00
@ bash tests/test.sh
fmt:
@ go fmt ./...
2016-11-09 17:12:29 -08:00
test_integrations: get_vendor_deps install test
2015-12-17 13:46:04 -08:00
get_deps:
2017-01-16 21:58:42 -08:00
@ go get -d `${NOVENDOR}`
2016-11-09 17:12:29 -08:00
2017-06-01 20:32:55 -07:00
tools:
go get -u -v $(GOTOOLS)
2016-11-09 17:12:29 -08:00
get_vendor_deps:
2017-01-16 21:58:42 -08:00
@ go get github.com/Masterminds/glide
@ glide install
2017-06-01 20:32:55 -07:00
metalinter: tools
@gometalinter --install
gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
metalinter_test: tools
@gometalinter --install
gometalinter --vendor --deadline=600s --disable-all \
--enable=maligned \
--enable=deadcode \
--enable=gas \
2017-09-21 12:46:51 -07:00
--enable=goconst \
--enable=goimports \
--enable=gosimple \
--enable=ineffassign \
2017-09-21 12:46:51 -07:00
--enable=megacheck \
--enable=misspell \
2017-09-21 12:46:51 -07:00
--enable=staticcheck \
--enable=safesql \
--enable=structcheck \
2017-09-21 12:46:51 -07:00
--enable=unconvert \
--enable=unused \
--enable=varcheck \
2017-09-21 12:46:51 -07:00
--enable=vetshadow \
./...
2017-10-18 11:21:16 -07:00
#--enable=dupl \
#--enable=errcheck \
#--enable=gocyclo \
#--enable=golint \ <== comments on anything exported
#--enable=gotype \
#--enable=interfacer \
#--enable=unparam \
#--enable=vet \
2017-09-22 07:09:05 -07:00
.PHONY: all build test fmt get_deps tools