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.7 KiB

9 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. PACKAGES=$(shell go list ./... | 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 ./cmd/...
  14. build:
  15. @ go build -i ./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 $(PACKAGES)
  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 $(PACKAGES)
  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=maligned \
  41. --enable=deadcode \
  42. --enable=gas \
  43. --enable=goconst \
  44. --enable=goimports \
  45. --enable=gosimple \
  46. --enable=ineffassign \
  47. --enable=megacheck \
  48. --enable=misspell \
  49. --enable=staticcheck \
  50. --enable=safesql \
  51. --enable=structcheck \
  52. --enable=unconvert \
  53. --enable=unused \
  54. --enable=varcheck \
  55. --enable=vetshadow \
  56. ./...
  57. #--enable=dupl \
  58. #--enable=errcheck \
  59. #--enable=gocyclo \
  60. #--enable=golint \ <== comments on anything exported
  61. #--enable=gotype \
  62. #--enable=interfacer \
  63. #--enable=unparam \
  64. #--enable=vet \
  65. .PHONY: all build test fmt get_deps tools