*: add gRPC to build system
This commit is contained in:
14
Makefile
14
Makefile
@@ -1,6 +1,7 @@
|
||||
PROJ="poke"
|
||||
ORG_PATH="github.com/coreos"
|
||||
REPO_PATH="$(ORG_PATH)/$(PROJ)"
|
||||
export PATH := $(PWD)/bin:$(PATH)
|
||||
|
||||
export GOBIN=$(PWD)/bin
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
@@ -41,15 +42,22 @@ fmt:
|
||||
@go fmt $(shell go list ./... | grep -v '/vendor/')
|
||||
|
||||
lint:
|
||||
@for package in $(shell go list ./... | grep -v '/vendor/'); do \
|
||||
@for package in $(shell go list ./... | grep -v '/vendor/' | grep -v 'api/apipb'); do \
|
||||
golint $$package; \
|
||||
done
|
||||
|
||||
# TODO(ericchiang): Grab protoc as well.
|
||||
grpc: bin/protoc-gen-go
|
||||
@protoc --go_out=plugins=grpc:. ./api/apipb/*.proto
|
||||
|
||||
bin/protoc-gen-go:
|
||||
@go install ${REPO_PATH}/vendor/github.com/golang/protobuf/protoc-gen-go
|
||||
|
||||
clean:
|
||||
rm bin/poke bin/pokectl
|
||||
@rm bin/*
|
||||
|
||||
testall: testrace vet fmt lint
|
||||
|
||||
FORCE:
|
||||
|
||||
.PHONY: test testrace vet fmt lint testall
|
||||
.PHONY: test testrace vet fmt lint testall grpc
|
||||
|
Reference in New Issue
Block a user