You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

9 years ago
8 years ago
8 years ago
9 years ago
8 years ago
9 years ago
8 years ago
9 years ago
8 years ago
8 years ago
  1. GOTOOLS = \
  2. github.com/mitchellh/gox \
  3. github.com/Masterminds/glide \
  4. github.com/alecthomas/gometalinter
  5. all: protoc install test
  6. NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/
  7. install-protoc:
  8. # Download: https://github.com/google/protobuf/releases
  9. go get github.com/golang/protobuf/protoc-gen-go
  10. protoc:
  11. @ protoc --go_out=plugins=grpc:. types/*.proto
  12. install:
  13. @ go install github.com/tendermint/abci/cmd/...
  14. build:
  15. @ go build -i github.com/tendermint/abci/cmd/...
  16. dist:
  17. @ bash scripts/dist.sh
  18. @ bash scripts/publish.sh
  19. # test.sh requires that we run the installed cmds, must not be out of date
  20. test: install
  21. find . -path ./vendor -prune -o -name *.sock -exec rm {} \;
  22. @ go test -p 1 `${NOVENDOR}`
  23. @ bash tests/test.sh
  24. fmt:
  25. @ go fmt ./...
  26. test_integrations: get_vendor_deps install test
  27. get_deps:
  28. @ go get -d `${NOVENDOR}`
  29. tools:
  30. go get -u -v $(GOTOOLS)
  31. get_vendor_deps:
  32. @ go get github.com/Masterminds/glide
  33. @ glide install
  34. metalinter: tools
  35. @gometalinter --install
  36. gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
  37. metalinter_test: tools
  38. @gometalinter --install
  39. gometalinter --vendor --deadline=600s --disable-all \
  40. --enable=aligncheck \
  41. --enable=deadcode \
  42. --enable=gas \
  43. --enable=goconst \
  44. --enable=goimports \
  45. --enable=gosimple \
  46. --enable=gotype \
  47. --enable=ineffassign \
  48. --enable=megacheck \
  49. --enable=misspell \
  50. --enable=staticcheck \
  51. --enable=safesql \
  52. --enable=structcheck \
  53. --enable=unconvert \
  54. --enable=unused \
  55. --enable=varcheck \
  56. --enable=vetshadow \
  57. ./...
  58. #--enable=dupl \
  59. #--enable=errcheck \
  60. #--enable=gocyclo \
  61. #--enable=golint \ <== comments on anything exported
  62. #--enable=interfacer \
  63. #--enable=unparam \
  64. #--enable=vet \
  65. .PHONY: all build test fmt get_deps tools