tendermint/Makefile

43 lines
983 B
Makefile
Raw Normal View History

2017-01-16 22:33:48 -08:00
.PHONY: all build test fmt lint get_deps
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:
2017-01-16 21:58:42 -08:00
@ go install github.com/tendermint/abci/cmd/...
2015-12-17 13:46:04 -08:00
2017-01-16 22:33:48 -08:00
build:
@ go build -i github.com/tendermint/abci/cmd/...
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-01-10 06:29:47 -08:00
find . -name test.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 ./...
lint:
@ go get -u github.com/golang/lint/golint
@ for file in $$(find "." -name '*.go' | grep -v '/vendor/' | grep -v '\.pb\.go'); do \
golint -set_exit_status $${file}; \
done;
2015-12-17 13:46:04 -08:00
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
get_vendor_deps:
2017-01-16 21:58:42 -08:00
@ go get github.com/Masterminds/glide
@ glide install