Makefile 965 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. default: check sbshttp
  2. .PHONY: clean
  3. clean: ## Clean up build artifacts
  4. rm -f sbshttp
  5. sbshttp: main.go ## Build the main binary
  6. go build -o sbshttp main.go
  7. .PHONY: check
  8. check: ## Ensure that code matchs best practices and run tests
  9. gometalinter \
  10. --deadline 10m \
  11. --vendor \
  12. --sort="path" \
  13. --aggregate \
  14. --enable-gc \
  15. --disable-all \
  16. --enable vet \
  17. --enable deadcode \
  18. --enable varcheck \
  19. --enable ineffassign \
  20. --enable gofmt \
  21. ./...
  22. #--enable golint \
  23. .PHONY: vendor
  24. vendor:
  25. dep ensure -v -vendor-only
  26. tools: ## Download and install all dev/code tools
  27. GO111MODULE=off go get -u github.com/golang/dep/cmd/dep
  28. GO111MODULE=off go get -u github.com/alecthomas/gometalinter
  29. GO111MODULE=off gometalinter --install
  30. .PHONY: help
  31. help: ## Display this help message
  32. @echo "make(1) targets:"
  33. @grep -E '^[a-zA-Z_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'