*: add gRPC to build system

This commit is contained in:
Eric Chiang 2016-07-31 23:26:05 -07:00
parent 94e26782b4
commit a28d22ff0c
2 changed files with 40 additions and 6 deletions

View file

@ -1,6 +1,7 @@
PROJ="poke" PROJ="poke"
ORG_PATH="github.com/coreos" ORG_PATH="github.com/coreos"
REPO_PATH="$(ORG_PATH)/$(PROJ)" REPO_PATH="$(ORG_PATH)/$(PROJ)"
export PATH := $(PWD)/bin:$(PATH)
export GOBIN=$(PWD)/bin export GOBIN=$(PWD)/bin
export GO15VENDOREXPERIMENT=1 export GO15VENDOREXPERIMENT=1
@ -41,15 +42,22 @@ fmt:
@go fmt $(shell go list ./... | grep -v '/vendor/') @go fmt $(shell go list ./... | grep -v '/vendor/')
lint: 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; \ golint $$package; \
done 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: clean:
rm bin/poke bin/pokectl @rm bin/*
testall: testrace vet fmt lint testall: testrace vet fmt lint
FORCE: FORCE:
.PHONY: test testrace vet fmt lint testall .PHONY: test testrace vet fmt lint testall grpc

View file

@ -1,5 +1,9 @@
# NOTE(ericchiang): Create a separate block for each dependency so it's clear
# which dependencies require which transitive dependencies.
package: github.com/coreos/poke package: github.com/coreos/poke
import: import:
- package: github.com/spf13/cobra - package: github.com/spf13/cobra
version: bc81c21bd0d8be5ba2d6630a505d79d4467566e7 version: bc81c21bd0d8be5ba2d6630a505d79d4467566e7
- package: github.com/spf13/pflag - package: github.com/spf13/pflag
@ -21,9 +25,6 @@ import:
- package: gopkg.in/yaml.v2 - package: gopkg.in/yaml.v2
version: a83829b6f1293c91addabc89d0571c246397bbf4 version: a83829b6f1293c91addabc89d0571c246397bbf4
- package: golang.org/x/net/context
version: d7bf3545bb0dacf009c535b3d3fbf53ac0a339ab
- package: github.com/gorilla/mux - package: github.com/gorilla/mux
version: 9fa818a44c2bf1396a17f9d5a3c0f6dd39d2ff8e version: 9fa818a44c2bf1396a17f9d5a3c0f6dd39d2ff8e
- package: github.com/gorilla/context - package: github.com/gorilla/context
@ -44,6 +45,8 @@ import:
version: v1.0.2 version: v1.0.2
- package: golang.org/x/oauth2 - package: golang.org/x/oauth2
version: 08c8d727d2392d18286f9f88ad775ad98f09ab33 version: 08c8d727d2392d18286f9f88ad775ad98f09ab33
# Not actually imported but glide detects it. Consider adding subpackages to
# the oauth2 package to eliminate.
- package: google.golang.org/appengine - package: google.golang.org/appengine
version: 267c27e7492265b84fc6719503b14a1e17975d79 version: 267c27e7492265b84fc6719503b14a1e17975d79
subpackages: subpackages:
@ -54,10 +57,33 @@ import:
- internal/datastore - internal/datastore
- internal/log - internal/log
- internal/remote_api - internal/remote_api
# Go's protobuf generator is also a direct dependency of this repo.
- package: github.com/golang/protobuf - package: github.com/golang/protobuf
version: 874264fbbb43f4d91e999fecb4b40143ed611400 version: 874264fbbb43f4d91e999fecb4b40143ed611400
subpackages: subpackages:
- proto - proto
- protoc-gen-go
- package: github.com/mitchellh/go-homedir - package: github.com/mitchellh/go-homedir
verison: 756f7b183b7ab78acdbbee5c7f392838ed459dda verison: 756f7b183b7ab78acdbbee5c7f392838ed459dda
- package: google.golang.org/grpc
version: v1.0.0
subpackages:
- codes
- credentials
- grpclog
- internal
- metadata
- naming
- transport
- peer
- package: golang.org/x/net
version: 6a513affb38dc9788b449d59ffed099b8de18fa0
subpackages:
- context # context is also imported directly by this repo.
- http2
- http2/hpack
- trace
- lex/httplex
- internal/timeseries