diff --git a/mage.go b/mage.go index ff8cf4b..b5d0cc2 100644 --- a/mage.go +++ b/mage.go @@ -164,9 +164,20 @@ func Tools(ctx context.Context) { tools := []string{ "github.com/golang/dep/cmd/dep", "github.com/golang/protobuf/protoc-gen-go", + // "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway", + // "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger", } for _, t := range tools { shouldWork(ctx, nil, wd, "go", "get", "-u", t) } } + +// Generate runs code generators and the like. +func Generate(ctx context.Context) { + dir := filepath.Join(wd, "proto") + + Tools(ctx) + + shouldWork(ctx, nil, dir, "sh", "./regen.sh") +} diff --git a/proto/regen.sh b/proto/regen.sh index 4989a1d..fdc1a10 100755 --- a/proto/regen.sh +++ b/proto/regen.sh @@ -5,15 +5,3 @@ protoc -I/usr/local/include -I. \ -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ --go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \ route.proto - -# protoc -I/usr/local/include -I. \ -# -I$GOPATH/src \ -# -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ -# --grpc-gateway_out=logtostderr=true:. \ -# route.proto - -# protoc -I/usr/local/include -I. \ -# -I$GOPATH/src \ -# -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ -# --swagger_out=logtostderr=true:. \ -# route.proto